:root {
  --ice: #effaff;
  --frost: #c7ecf7;
  --aqua: #49c7d9;
  --teal: #0b6f7c;
  --deep: #12323c;
  --navy: #162437;
  --ink: #0d1b2a;
  --muted: #617284;
  --line: #d8e5ec;
  --panel: #ffffff;
  --panel-soft: #f6fbfd;
  --amber: #f2a541;
  --danger: #c83e4d;
  --ok: #197d62;
  --shadow: 0 20px 60px rgba(18, 50, 60, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(73, 199, 217, 0.16), transparent 32%),
    linear-gradient(315deg, rgba(242, 165, 65, 0.12), transparent 26%),
    #f7fbfd;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.intro-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(28, 124, 150, 0.22), transparent 46%),
    #03121c;
}

.intro-video {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  object-fit: contain;
  object-position: center;
  background: #03121c;
}

.intro-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 62%, rgba(3, 18, 28, 0.64)),
    radial-gradient(circle at 50% 50%, transparent 42%, rgba(3, 18, 28, 0.22));
}

.intro-skip {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 2;
}

.entry {
  display: grid;
  grid-template-columns: minmax(360px, 0.94fr) minmax(460px, 1.06fr);
  min-height: 100vh;
}

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 38px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(rgba(18, 50, 60, 0.55), rgba(18, 50, 60, 0.78)),
    url("./assets/yeti-mascot.png") center 45% / cover no-repeat;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(transparent, rgba(8, 24, 32, 0.72));
}

.brand-lockup,
.brand-copy,
.brand-foot {
  position: relative;
  z-index: 1;
}

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

.mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.mark img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
}

.brand-name {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-tagline {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.brand-copy h1 {
  max-width: 720px;
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 0.94;
  letter-spacing: 0;
}

.brand-copy p {
  max-width: 570px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.55;
}

.brand-foot {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.frost-chip {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  font-size: 12px;
}

.chip-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: #082f3a;
  background: rgba(168, 236, 255, 0.86);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.auth-panel {
  position: relative;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 34px;
  min-height: 100vh;
  padding: 32px;
  overflow: hidden;
}

.auth-manifesto {
  position: relative;
  z-index: 2;
  width: min(100%, 760px);
  margin: 0 0 4px;
  color: var(--deep);
  text-align: center;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 3.15vw, 48px);
  font-style: italic;
  font-weight: 700;
  line-height: 1.05;
  text-wrap: balance;
  letter-spacing: 0;
  text-shadow: 0 12px 26px rgba(3, 53, 67, 0.14);
  transform: translateY(-18px);
}

.digital-footprints {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.digital-footprints span {
  position: absolute;
  width: 62px;
  height: 84px;
  border: 2px solid rgba(190, 242, 255, 0.78);
  border-radius: 48% 52% 43% 57% / 34% 36% 66% 64%;
  background:
    linear-gradient(90deg, transparent 0 12px, rgba(205, 249, 255, 0.74) 12px 14px, transparent 14px 100%),
    linear-gradient(90deg, transparent 0 24px, rgba(205, 249, 255, 0.68) 24px 26px, transparent 26px 100%),
    linear-gradient(90deg, transparent 0 38px, rgba(205, 249, 255, 0.58) 38px 40px, transparent 40px 100%),
    linear-gradient(0deg, transparent 0 18px, rgba(205, 249, 255, 0.7) 18px 20px, transparent 20px 100%),
    linear-gradient(0deg, transparent 0 34px, rgba(205, 249, 255, 0.62) 34px 36px, transparent 36px 100%),
    radial-gradient(circle at 32% 24%, rgba(214, 255, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 54% 33%, rgba(214, 255, 255, 0.92) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 48%, rgba(214, 255, 255, 0.88) 0 2px, transparent 3px),
    radial-gradient(circle at 40% 63%, rgba(214, 255, 255, 0.78) 0 2px, transparent 3px),
    repeating-linear-gradient(90deg, transparent 0 8px, rgba(31, 190, 218, 0.44) 8px 14px),
    repeating-linear-gradient(0deg, transparent 0 8px, rgba(31, 190, 218, 0.34) 8px 14px),
    radial-gradient(ellipse at 46% 42%, rgba(136, 220, 247, 0.86), rgba(50, 145, 211, 0.82) 62%, rgba(8, 66, 124, 0.78));
  background-size:
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    100% 100%,
    30px 28px,
    30px 28px,
    100% 100%;
  background-position:
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    0 0,
    8px 58px,
    8px 58px,
    0 0;
  box-shadow:
    0 0 0 1px rgba(77, 210, 237, 0.18),
    0 0 22px rgba(36, 177, 218, 0.32),
    0 18px 34px rgba(14, 116, 144, 0.14);
  opacity: 0.76;
  filter: saturate(1.16);
}

.digital-footprints span::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 1px;
  width: 14px;
  height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(224, 255, 255, 0.95), rgba(67, 157, 221, 0.78) 68%);
  box-shadow:
    13px -8px 0 1px rgba(87, 170, 229, 0.82),
    29px -10px 0 2px rgba(87, 170, 229, 0.86),
    47px -6px 0 1px rgba(87, 170, 229, 0.78),
    60px 3px 0 -1px rgba(87, 170, 229, 0.64);
  filter: drop-shadow(0 0 8px rgba(79, 205, 235, 0.42));
}

.digital-footprints span::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: 1px;
  width: 36px;
  height: 38px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(90deg, rgba(48, 202, 231, 0.5) 0 6px, transparent 6px 12px),
    repeating-linear-gradient(0deg, rgba(48, 202, 231, 0.46) 0 6px, transparent 6px 12px);
  opacity: 0.72;
  mask-image: linear-gradient(135deg, transparent 0 16%, #000 17% 72%, transparent 73% 100%);
}

.digital-footprints span:nth-child(1) {
  left: 7%;
  bottom: 5%;
  transform: rotate(-11deg) scale(0.66);
}

.digital-footprints span:nth-child(2) {
  left: 21%;
  bottom: 10%;
  transform: rotate(9deg) scale(0.72);
}

.digital-footprints span:nth-child(3) {
  left: 34%;
  bottom: 18%;
  transform: rotate(-8deg) scale(0.76);
}

.digital-footprints span:nth-child(4) {
  left: 49%;
  bottom: 12%;
  transform: rotate(12deg) scale(0.78);
}

.digital-footprints span:nth-child(5) {
  left: 65%;
  bottom: 17%;
  transform: rotate(-10deg) scale(0.76);
}

.digital-footprints span:nth-child(6) {
  left: 80%;
  bottom: 27%;
  transform: rotate(14deg) scale(0.72);
}

.digital-footprints span:nth-child(7) {
  left: 87%;
  bottom: 43%;
  transform: rotate(-12deg) scale(0.64);
  opacity: 0.52;
}

.digital-footprints span:nth-child(8) {
  left: 77%;
  bottom: 57%;
  transform: rotate(9deg) scale(0.56);
  opacity: 0.42;
}

.auth-card {
  position: relative;
  z-index: 2;
  width: min(100%, 520px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.entry-credit {
  position: absolute;
  right: 24px;
  bottom: 18px;
  z-index: 2;
  margin: 0;
  color: rgba(18, 50, 60, 0.58);
  font-size: 12px;
  font-weight: 750;
}

.auth-message {
  color: #b91c1c;
  font-weight: 800;
  margin: 0 0 12px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.tab.active {
  color: var(--deep);
  background: #fff;
  box-shadow: 0 3px 16px rgba(18, 50, 60, 0.11);
}

.view {
  display: none;
}

.view.active {
  display: block;
}

h2,
h3,
p {
  letter-spacing: 0;
}

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

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

label {
  display: grid;
  gap: 7px;
  color: var(--deep);
  font-size: 13px;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9d8e0;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(73, 199, 217, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn.secondary {
  color: var(--deep);
  border-color: var(--line);
  background: #fff;
}

.btn.ghost {
  color: var(--teal);
  background: transparent;
}

.btn.danger {
  background: var(--danger);
}

.btn.icon {
  width: 40px;
  padding: 0;
}

.btn.full {
  width: 100%;
}

.btn.small {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
}

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

.about-copy {
  color: var(--deep);
  line-height: 1.65;
}

.institution-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.institution-box h3 {
  margin: 0 0 4px;
}

.institution-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.institution-logo-preview {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.institution-logo-preview img {
  width: 86px;
  height: 96px;
  object-fit: contain;
}

.institution-fields {
  display: grid;
  gap: 10px;
}

.institution-header {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 104px;
  align-items: center;
  gap: 18px;
  min-height: 108px;
  margin-bottom: 24px;
}

.institution-logo-box {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  justify-self: start;
  overflow: hidden;
}

.institution-logo-box img {
  width: auto;
  height: auto;
  max-width: 96px;
  max-height: 96px;
  border-radius: 4px;
  object-fit: contain;
}

.institution-lines {
  text-align: center;
  color: #222;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
  text-wrap: balance;
}

.topbar {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.topbar .brand-lockup {
  color: var(--deep);
}

.topbar .brand-tagline {
  color: var(--muted);
}

.main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.toolbar h2 {
  margin: 0 0 6px;
  font-size: 30px;
}

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

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

.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stat b {
  display: block;
  font-size: 28px;
  color: var(--deep);
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.case-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 6px 20px rgba(18, 50, 60, 0.07);
}

.case-card.selected {
  border-color: var(--aqua);
  box-shadow: 0 0 0 3px rgba(73, 199, 217, 0.18);
}

.case-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.case-title {
  margin: 0;
  color: var(--deep);
  font-size: 17px;
}

.meta {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 8px;
  color: var(--deep);
  background: var(--ice);
  font-size: 12px;
  font-weight: 800;
}

.platform-icon {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.platform-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.instagram { background: linear-gradient(135deg, #7c3aed, #e11d48, #f59e0b); }
.facebook { background: #1877f2; }
.whatsapp { background: #25d366; color: #083b22; }
.phone { background: #0b6f7c; }
.imei { background: #3c5064; }
.gmail { background: linear-gradient(135deg, #ea4335, #fbbc05, #34a853, #4285f4); }
.icloud { background: linear-gradient(135deg, #7dd3fc, #2563eb); }
.ip { background: #111827; }

.empty {
  padding: 46px;
  border: 1px dashed #bfd3dc;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
}

.case-builder,
.workbench {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 22px;
}

.side-panel,
.content-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.side-panel {
  align-self: start;
  padding: 18px;
}

.content-panel {
  padding: 22px;
}

.step-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.step {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  color: var(--muted);
}

.step.active {
  color: var(--deep);
  background: var(--ice);
  font-weight: 800;
}

.step-num {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  font-size: 12px;
}

.platform-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.platform-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.platform-card.active {
  border-color: var(--aqua);
  background: var(--ice);
}

.platform-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.info-button {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal);
  background: #fff;
  font-weight: 900;
}

.hint {
  padding: 12px;
  border-left: 4px solid var(--aqua);
  border-radius: 8px;
  background: var(--ice);
  color: var(--deep);
  line-height: 1.55;
}

.workflow {
  display: grid;
  gap: 14px;
}

.task {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task h3 {
  margin: 0 0 8px;
  color: var(--deep);
}

.attachments-panel {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
}

.attachments-panel h3 {
  margin: 0 0 10px;
}

.upload-form {
  display: grid;
  gap: 10px;
}

.upload-form input[type="file"] {
  max-width: 100%;
}

.attachment-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.attachment-item {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.attachment-item a {
  color: #0f766e;
  font-weight: 800;
  word-break: break-word;
}

.attachment-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

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

.analysis-card-head label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--deep);
  font-weight: 800;
}

.task p,
.task li {
  color: var(--muted);
  line-height: 1.55;
}

.task ol {
  padding-left: 20px;
}

.upload-zone {
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px dashed #aac5d0;
  border-radius: 8px;
  background: var(--panel-soft);
}

.upload-zone textarea,
.upload-zone input {
  max-width: 100%;
}

.link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.period-box {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.period-box legend {
  padding: 0 6px;
  color: var(--deep);
  font-weight: 900;
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.ip-event-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.ip-event-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(140px, 1fr) minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.ip-event-row label {
  min-width: 0;
}

.manual-imei-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.office-preview {
  max-height: 180px;
  overflow: auto;
  white-space: pre-wrap;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--deep);
  background: var(--panel-soft);
  font-size: 13px;
  line-height: 1.5;
}

.result-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.result-item {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  line-height: 1.35;
}

.result-item b {
  display: block;
  color: var(--deep);
  margin-bottom: 4px;
}

.analysis-evidence {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.next-trails {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.next-trails h4 {
  margin: 0 0 4px;
  color: var(--deep);
}

.trail-suggestion-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.trail-suggestion {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.trail-suggestion b,
.trail-suggestion small {
  overflow-wrap: anywhere;
}

.trail-kind {
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tutorial-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.tutorial-head p {
  margin: 3px 0 0;
}

.tutorial-logo .platform-icon {
  width: 46px;
  height: 46px;
}

.tutorial-alert {
  margin: 12px 0;
  padding: 12px;
  border-left: 4px solid #f2a541;
  border-radius: 8px;
  background: #fff7e7;
  color: var(--deep);
  font-weight: 800;
  line-height: 1.45;
}

.tutorial-steps {
  display: grid;
  gap: 10px;
}

.tutorial-visual {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 12px 0;
}

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

.tutorial-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.tutorial-image-grid figure {
  min-width: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tutorial-image-grid img {
  display: block;
  width: 100%;
  height: 118px;
  object-fit: contain;
  border-radius: 6px;
  background: #f8fafc;
}

.tutorial-image-grid figcaption {
  margin-top: 7px;
  color: var(--deep);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.mock-browser {
  min-width: 0;
  padding: 12px;
  border: 1px solid #bed4df;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(10, 42, 52, 0.08);
}

.mock-top {
  margin: -12px -12px 10px;
  padding: 8px 12px;
  border-radius: 8px 8px 0 0;
  color: #fff;
  background: #315fba;
  font-size: 12px;
  font-weight: 800;
}

.mock-browser h4 {
  margin: 0 0 10px;
  color: var(--deep);
}

.mock-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.mock-row span {
  overflow-wrap: anywhere;
}

.mock-row.highlight {
  background: #fffbd1;
  border: 1px solid #f2d95c;
  border-radius: 6px;
}

.mock-note {
  margin-top: 10px;
  padding: 9px;
  border-left: 4px solid var(--aqua);
  border-radius: 6px;
  background: var(--ice);
  color: var(--deep);
  font-size: 13px;
  line-height: 1.45;
}

.tutorial-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.tutorial-step > span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font-weight: 900;
}

.tutorial-step h4 {
  margin: 0 0 4px;
  color: var(--deep);
}

.tutorial-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.tutorial-summary {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--ice);
  color: var(--deep);
}

.tutorial-summary ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.report {
  white-space: pre-wrap;
  min-height: 420px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  line-height: 1.65;
}

.mindmap-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  overflow: hidden;
}

.mindmap-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.mindmap-controls [data-mindmap-zoom-label] {
  min-width: 48px;
  text-align: center;
  color: var(--deep);
  font-weight: 900;
}

.mindmap-wrap {
  position: relative;
  overflow: hidden;
  height: calc(100vh - 275px);
  min-height: 520px;
  background:
    radial-gradient(circle at 1px 1px, rgba(13, 27, 42, 0.13) 1px, transparent 0) 0 0 / 24px 24px,
    #fbfdff;
  cursor: grab;
  touch-action: none;
}

.mindmap-wrap.panning {
  cursor: grabbing;
}

.mindmap {
  display: block;
  max-width: none;
  transform-origin: 0 0;
  user-select: none;
}

.mindmap-node {
  cursor: pointer;
}

.mindmap-node.dragging {
  cursor: grabbing;
}

.mindmap-node.dragging rect {
  stroke-width: 3;
}

.mindmap-editor,
.analysis-history {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.mindmap-editor h3 {
  margin: 0 0 6px;
}

.editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.editor-grid.compact {
  grid-template-columns: repeat(2, minmax(160px, 240px));
}

.advanced-position {
  margin-top: 12px;
}

.advanced-position summary {
  cursor: pointer;
  color: var(--deep);
  font-weight: 900;
}

.editor-grid label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.editor-grid textarea,
.editor-grid input,
.editor-grid select {
  width: 100%;
  min-width: 0;
  border: 1px solid #c8dbe4;
  border-radius: 7px;
  padding: 10px;
  background: #fff;
}

.editor-grid textarea {
  resize: vertical;
}

.editor-links {
  align-items: end;
}

.analysis-history summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--deep);
}

.analysis-card {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.result-list.compact {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-top: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(13, 27, 42, 0.42);
}

.modal {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(820px, 100%);
  max-height: calc(100vh - 40px);
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.modal h3 {
  margin-top: 0;
}

.modal-scroll {
  min-height: 0;
  overflow: auto;
  padding-right: 8px;
}

.modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.signature-block {
  text-align: center;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .entry,
  .case-builder,
  .workbench {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 420px;
  }

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

@media (max-width: 640px) {
  .intro-screen {
    min-height: 100dvh;
  }

  .intro-video {
    width: 100vw;
    height: 100dvh;
    object-fit: contain;
  }

  .intro-skip {
    right: 16px;
    bottom: 16px;
  }

  .main,
  .auth-panel,
  .brand-panel {
    padding: 18px;
  }

  .toolbar,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .two,
  .platform-options,
  .stats,
  .institution-layout,
  .period-grid,
  .ip-event-row,
  .tutorial-visual.two {
    grid-template-columns: 1fr;
  }

  .institution-header {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    min-height: 82px;
  }

  .institution-header > div:last-child {
    display: none;
  }

  .institution-logo-box {
    width: 68px;
    height: 68px;
  }

  .institution-logo-box img {
    max-width: 68px;
    max-height: 68px;
  }

  .institution-lines {
    font-size: 12px;
  }

  .auth-manifesto {
    width: min(100%, 460px);
    font-size: 28px;
    transform: translateY(-8px);
  }

  .digital-footprints span {
    width: 30px;
    height: 42px;
  }

  .digital-footprints span:nth-child(1) {
    left: 10px;
  }

  .digital-footprints span:nth-child(2) {
    left: 32%;
  }

  .digital-footprints span:nth-child(3) {
    left: 58%;
  }

  .digital-footprints span:nth-child(n+5) {
    display: none;
  }

  .actions {
    width: 100%;
  }

  .actions .btn {
    flex: 1 1 180px;
  }
}

@media print {
  @page {
    size: A4 landscape;
    margin: 8mm;
  }

  body {
    background: #fff;
  }

  .topbar,
  .toolbar .actions,
  .modal-backdrop {
    display: none !important;
  }

  .app-shell,
  .main {
    max-width: none;
    width: 100%;
    padding: 0;
  }

  .toolbar {
    margin-bottom: 8px;
    padding: 0;
    border: 0;
  }

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

  .toolbar p {
    margin: 2px 0 0;
    font-size: 11px;
  }

  .mindmap-shell,
  .mindmap-wrap {
    overflow: visible;
    max-height: none;
    border: 0;
    background: #fff;
    height: auto;
    min-height: 0;
  }

  .mindmap-controls {
    display: none;
  }

  .mindmap {
    width: 100%;
    min-width: 0;
    height: auto !important;
    max-height: 180mm;
  }

  .report {
    border: 0;
    padding: 0;
  }
}
