@import url("assets/preview-fonts.css");
:root {
  --paper: #faf6f9;
  --soft: #f2e9ef;
  --ink: #30232c;
  --wine: #7b2945;
  --muted: #796873;
  --line: #e6dce2;
  --white: #fff;
  --amber: #82531e;
  font-family: 'Golos Text',Arial,sans-serif;
  color: var(--ink);
  background: #ede8ed;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,input,select,textarea {
  font: inherit;
  color: inherit;
}

button,a,select {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

h1,h2,h3,p {
  margin: 0;
}

button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible {
  outline: 3px solid #b45c80;
  outline-offset: 3px;
}

button,input,select,textarea {
  max-width: 100%;
}

svg {
  vertical-align: middle;
  pointer-events: none;
}

.study {
  max-width: 1440px;
  margin: auto;
  padding: 22px 30px 30px;
}

.study-top {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
}

.study-top>div {
  min-width: 0;
}

.study-label {
  font-size: 13px;
  font-weight: 600;
}

.study-sub {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 4px;
}

.motion {
  background: transparent;
  border: 1px solid #cfc3cd;
  border-radius: 25px;
  padding: 9px 13px;
  white-space: nowrap;
  font-size: 12px;
}

.shell {
  background: var(--paper);
  border: 1px solid #e1d7df;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 14px 50px #36233309;
}

.mast {
  padding: 23px 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.5px;
}

.brand svg {
  color: var(--wine);
}

.mast-links {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 12px;
}

.badge {
  color: var(--wine);
  border: 1px solid #d7bdc9;
  border-radius: 4px;
  background: #fff8fc;
  padding: 6px 8px;
  font: 10px 'IBM Plex Mono',monospace;
  letter-spacing: .6px;
  white-space: nowrap;
}

.nav {
  display: flex;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  gap: 28px;
}

.nav button {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 19px 0;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.nav button[aria-current=page] {
  border-color: var(--wine);
  color: var(--wine);
  font-weight: 600;
}

.content {
  padding: 34px;
  min-height: 630px;
}

.heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 25px;
}

.eyebrow {
  color: var(--wine);
  font: 10px/1.6 'IBM Plex Mono',monospace;
  text-transform: uppercase;
  letter-spacing: 1.6px;
  margin-bottom: 12px;
}

h1 {
  font: 36px/1.25 'Prata',Georgia,serif;
  letter-spacing: -1.3px;
}

h2 {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -.3px;
}

h3 {
  font-size: 14px;
  font-weight: 600;
}

.lede {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  margin-top: 12px;
  max-width: 640px;
}

.meta {
  font: 10px/1.8 'IBM Plex Mono',monospace;
  color: var(--muted);
}

.heading>.meta {
  max-width: 225px;
  text-align: right;
  padding-top: 4px;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0,1fr);
  gap: 30px;
}

.layout>* {
  min-width: 0;
}

.products {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  transition: background .2s,border-color .2s;
}

.product.active {
  border-color: #ad6483;
  background: #fff8fc;
}

.product img {
  width: 48px;
  height: 58px;
  object-fit: cover;
  border-radius: 3px;
}

.product strong {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.product small {
  display: block;
  font: 9px/1.7 'IBM Plex Mono',monospace;
  color: var(--muted);
}

.ticket {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  overflow: hidden;
}

.photo-wrap {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: breathe 13s ease-in-out infinite;
}

.tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  right: 12px;
  background: #fffcf9eF;
  padding: 12px;
  border-left: 3px solid var(--wine);
  backdrop-filter: blur(5px);
}

.tag strong {
  font: 18px 'Prata',Georgia,serif;
}

.tag p {
  font: 9px/1.7 'IBM Plex Mono',monospace;
  margin-top: 4px;
}

.ticket-foot {
  padding: 14px;
  font-size: 11px;
  line-height: 1.7;
  border-top: 1px dashed #cdb6c3;
  color: var(--muted);
}

.scenario {
  margin-top: 19px;
}

.scenario label {
  font-size: 11px;
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
}

select,input,textarea {
  width: 100%;
  border: 1px solid #d6c8d1;
  border-radius: 5px;
  background: white;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
}

textarea {
  resize: vertical;
}

.field {
  min-width: 0;
}

.field>label {
  display: block;
  font-size: 11px;
  margin-bottom: 7px;
  color: var(--muted);
}

.field textarea {
  min-height: 365px;
  line-height: 1.85;
}

.primary,.secondary,.danger,.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 5px;
  min-height: 41px;
  padding: 10px 16px;
  font-size: 12px;
  line-height: 1.5;
  text-decoration: none;
  transition: transform .16s,background .16s;
}

.primary {
  background: var(--wine);
  color: #fff;
  border: 1px solid var(--wine);
}

.primary:hover {
  background: #642039;
}

.primary:active,.secondary:active {
  transform: translateY(1px);
}

.secondary {
  background: #fff;
  border: 1px solid #cdb7c4;
}

.secondary:hover {
  background: #f8edf3;
}

.text-btn {
  background: transparent;
  border: 0;
  padding-left: 0;
  color: var(--wine);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.danger {
  border: 1px solid #bd8b99;
  background: white;
  color: #8c3047;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 11px;
  line-height: 1.75;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.panel-pad {
  padding: 22px;
}

.product-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 18px;
}

.product-head h2 {
  font: 26px/1.3 'Prata',Georgia,serif;
  letter-spacing: -.6px;
}

.summary {
  display: flex;
  gap: 25px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 23px;
}

.summary strong {
  font: 24px 'Prata',Georgia,serif;
  margin-right: 7px;
}

.summary span {
  font-size: 11px;
  color: var(--muted);
}

.issue {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  display: grid;
  grid-template-columns: minmax(0,1fr) 95px 20px;
  gap: 18px;
  text-align: left;
  padding: 19px 0;
  align-items: center;
}

.issue:last-child {
  border-bottom: 0;
}

.issue:hover .issue-title {
  color: var(--wine);
}

.issue-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.issue-desc {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
  margin-top: 5px;
}

.fraction {
  font: 17px 'Prata',Georgia,serif;
  color: var(--wine);
  text-align: right;
}

.fraction small {
  display: block;
  font: 9px/1.7 'IBM Plex Mono',monospace;
  color: var(--muted);
  margin-top: 3px;
}

.arrow {
  color: var(--wine);
  font-size: 20px;
}

.return-box {
  margin-top: 20px;
  border-left: 3px solid #c398ad;
  background: var(--soft);
  padding: 16px 18px;
  font-size: 12px;
  line-height: 1.8;
}

.return-box strong {
  font-weight: 600;
}

.return-box p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}

.note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 15px;
}

.notice {
  background: #f8ede3;
  border: 1px solid #ead3bc;
  border-radius: 6px;
  padding: 15px 17px;
  color: #704820;
  font-size: 12px;
  line-height: 1.75;
  margin: 17px 0;
}

.notice strong {
  display: block;
  font-weight: 600;
}

.notice .actions {
  margin-top: 10px;
}

.neutral {
  background: var(--soft);
  border-color: var(--line);
  color: var(--ink);
}

.empty {
  padding: 33px 25px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.empty-symbol {
  font: 38px 'Prata',Georgia,serif;
  color: var(--wine);
  margin-bottom: 15px;
}

.empty h2 {
  font: 25px 'Prata',Georgia,serif;
}

.empty p {
  font-size: 12px;
  line-height: 1.85;
  color: var(--muted);
  max-width: 540px;
  margin: 13px 0 20px;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(180px,.8fr) minmax(0,1.2fr);
  gap: 20px;
}

.review-layout>* {
  min-width: 0;
}

.review-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.review-item {
  background: white;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
  padding: 14px;
  width: 100%;
}

.review-item.active {
  border-color: #ac6b88;
  box-shadow: inset 3px 0 var(--wine);
}

.review-item p {
  font-size: 12px;
  line-height: 1.7;
  margin: 8px 0;
}

.review-item>div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.review-item .meta {
  font-size: 9px;
}

.chips {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.chip {
  font-size: 9px;
  line-height: 1.7;
  padding: 2px 6px;
  background: var(--soft);
  color: var(--wine);
  border-radius: 3px;
}

.quote {
  font: 18px/1.7 'Prata',Georgia,serif;
  margin: 18px 0;
  overflow-wrap: anywhere;
}

.quote mark {
  background: #f3dfe9;
  color: inherit;
}

.source-line {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 13px;
  margin: 15px 0 19px;
}

.checks label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.6;
}

.checks input,.flag input {
  width: 15px;
  height: 15px;
  accent-color: var(--wine);
  margin: 2px 0;
  flex-shrink: 0;
}

.flag {
  display: flex;
  gap: 8px;
  font-size: 11px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.quote-lines {
  margin: 16px 0;
}

.quote-line {
  font-size: 11px;
  line-height: 1.8;
  border-left: 2px solid #c398ad;
  padding-left: 11px;
  margin: 8px 0;
}

.quote-line b {
  display: block;
  color: var(--wine);
  font-weight: 500;
}

.task-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 17px;
}

.task-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 18px 0;
}

.task-foot {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 12px;
  align-items: center;
}

.task-foot .meta {
  font-size: 9px;
}

.basis {
  margin-bottom: 18px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.basis p {
  font-size: 11px;
  line-height: 1.8;
  margin-top: 6px;
}

.basis b {
  color: var(--wine);
}

.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.export-card {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.export-icon {
  font: 11px 'IBM Plex Mono',monospace;
  color: var(--wine);
  border: 1px solid #be8ea4;
  border-radius: 3px;
  padding: 10px 8px;
  margin-bottom: 22px;
}

.export-card h2 {
  font: 22px 'Prata',Georgia,serif;
}

.export-card p {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 12px 0 20px;
  flex: 1;
}

.export-card .primary,.export-card .secondary {
  margin-top: auto;
}

.delete-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  border-top: 1px solid var(--line);
  margin-top: 27px;
  padding-top: 21px;
}

.delete-row p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 20px 34px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 25px;
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
}

.footer>div {
  max-width: 630px;
}

.footer details {
  max-width: 300px;
}

.footer summary {
  cursor: pointer;
}

.footer p {
  margin-top: 9px;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  font-size: 12px;
  line-height: 1.6;
  padding: 13px 20px;
  border-radius: 6px;
  z-index: 12;
  max-width: calc(100% - 32px);
  box-shadow: 0 8px 30px #30232c25;
}

.hidden {
  display: none!important;
}

dialog {
  padding: 0;
  border: 1px solid #d5c0ce;
  border-radius: 12px;
  max-width: calc(100vw - 30px);
  width: 920px;
  max-height: 88vh;
  box-shadow: 0 20px 100px #30232c25;
  color: var(--ink);
  background: var(--paper);
}

dialog::backdrop {
  background: #30232c55;
  backdrop-filter: blur(3px);
}

.dialog-head {
  padding: 20px 25px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
}

.dialog-head h2 {
  font-size: 15px;
}

.close {
  border: 1px solid var(--line);
  background: white;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.dialog-body {
  padding: 25px;
  overflow-wrap: anywhere;
}

.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.comparison>div {
  min-width: 0;
}

.version-text {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.85;
  background: white;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 6px;
  margin: 12px 0;
  max-height: 390px;
  overflow: auto;
}

.print-sheet {
  background: white;
  border: 1px solid var(--line);
  padding: 30px;
  max-width: 720px;
  margin: 0 auto;
}

.print-sheet h3 {
  font: 26px 'Prata',Georgia,serif;
  margin-bottom: 20px;
}

.print-sheet pre {
  font: 12px/1.9 'Golos Text',Arial,sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.print-sheet .meta {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 15px;
}

.sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 17px 0;
}

.sheet-tabs button {
  background: white;
  border: 1px solid var(--line);
  padding: 9px 13px;
  border-radius: 4px;
  font-size: 11px;
}

.sheet-tabs button.active {
  border-color: var(--wine);
  color: var(--wine);
  background: #f5e7ef;
}

.table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid var(--line);
  background: white;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 580px;
  text-align: left;
  font-size: 11px;
  line-height: 1.7;
}

th,td {
  padding: 12px 14px;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--soft);
  font-weight: 500;
  font-size: 10px;
}

td:first-child {
  white-space: nowrap;
}

.cancel-block {
  max-width: 630px;
  margin: auto;
  padding: 40px 0;
}

.cancel-block .empty {
  padding: 35px;
}

.conflict {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}

.conflict>div {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px;
  background: white;
  font-size: 11px;
  line-height: 1.8;
}

.conflict b {
  color: var(--wine);
  display: block;
  font-size: 12px;
  margin-bottom: 7px;
}

.paused .photo-wrap img {
  animation-play-state: paused;
}

@keyframes breathe {
  0%,100% {
    transform: scale(1.02) translateY(0);
  }

  50% {
    transform: scale(1.07) translateY(-4px);
  }

}

@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after {
    animation: none!important;
    transition: none!important;
    scroll-behavior: auto!important;
  }

}

@media(max-width:1050px) {
  .study {
    padding: 17px;
  }

  .content {
    padding: 25px;
  }

  .mast,.footer {
    padding: 21px 25px;
  }

  .nav {
    padding: 0 25px;
  }

  .layout {
    grid-template-columns: 180px minmax(0,1fr);
    gap: 22px;
  }

  .review-layout {
    grid-template-columns: 1fr;
  }

  .review-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .quote {
    font-size: 17px;
  }

  .heading>.meta {
    max-width: 170px;
  }

  .ticket .photo-wrap {
    height: 185px;
  }

  .export-card {
    padding: 18px;
  }

}

@media(max-width:650px) {
  .study {
    padding: 10px;
  }

  .study-top {
    gap: 10px;
    align-items: flex-start;
  }

  .study-label {
    font-size: 11px;
  }

  .study-sub {
    font-size: 10px;
  }

  .motion {
    padding: 7px 9px;
    font-size: 10px;
  }

  .mast {
    padding: 18px 17px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    font-size: 18px;
  }

  .mast-links {
    font-size: 10px;
    gap: 14px;
    width: 100%;
    justify-content: space-between;
  }

  .badge {
    font-size: 8px;
  }

  .nav {
    padding: 0 17px;
    gap: 19px;
    overflow: auto;
  }

  .nav button {
    font-size: 11px;
    padding: 16px 0;
  }

  .content {
    padding: 22px 17px;
  }

  .heading {
    display: block;
  }

  .heading>.meta {
    text-align: left;
    max-width: none;
    margin-top: 13px;
  }

  h1 {
    font-size: 29px;
  }

  .lede {
    font-size: 12px;
  }

  .layout {
    grid-template-columns: minmax(0,1fr);
    gap: 23px;
  }

  .products {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 7px;
  }

  .product {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 8px;
    gap: 8px;
  }

  .product img {
    width: 100%;
    height: 80px;
    object-fit: cover;
  }

  .product strong {
    font-size: 10px;
  }

  .product small {
    font-size: 8px;
  }

  .ticket {
    display: none;
  }

  .scenario {
    margin-top: 13px;
  }

  .scenario select {
    font-size: 11px;
    padding: 8px;
  }

  .product-head h2 {
    font-size: 24px;
  }

  .product-head {
    gap: 10px;
  }

  .summary {
    gap: 16px;
    flex-wrap: wrap;
  }

  .summary strong {
    font-size: 22px;
  }

  .summary span {
    font-size: 10px;
  }

  .issue {
    grid-template-columns: minmax(0,1fr) 70px 12px;
    gap: 10px;
  }

  .issue-title {
    font-size: 13px;
  }

  .issue-desc {
    font-size: 10px;
  }

  .fraction {
    font-size: 16px;
  }

  .panel-pad {
    padding: 18px;
  }

  .review-list {
    grid-template-columns: 1fr;
  }

  .review-item {
    padding: 12px;
  }

  .review-item p {
    font-size: 11px;
  }

  .quote {
    font-size: 17px;
  }

  .checks {
    grid-template-columns: 1fr;
  }

  .task-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .task-fields {
    grid-template-columns: 1fr;
  }

  .task-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .field textarea {
    min-height: 430px;
    font-size: 12px;
  }

  .export-grid,.comparison,.conflict {
    grid-template-columns: 1fr;
  }

  .export-card {
    padding: 22px;
  }

  .export-card p {
    max-width: 300px;
  }

  .delete-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer {
    padding: 18px 17px;
    flex-direction: column;
    font-size: 9px;
    gap: 13px;
  }

  .dialog-head {
    padding: 16px;
  }

  .dialog-body {
    padding: 17px;
  }

  .print-sheet {
    padding: 19px;
  }

  .print-sheet h3 {
    font-size: 22px;
  }

  .primary,.secondary,.danger {
    font-size: 11px;
    padding: 10px 13px;
  }

  .notice {
    font-size: 11px;
  }

  .heading {
    margin-bottom: 21px;
  }

  .empty {
    padding: 25px 19px;
  }

  .empty h2 {
    font-size: 23px;
  }

  .summary {
    margin-bottom: 10px;
  }

  .cancel-block {
    padding: 5px 0;
  }

}

@media print {
  body {
    background: white;
  }

  .study,.toast {
    display: none!important;
  }

  dialog {
    display: block!important;
    position: static;
    width: auto;
    max-width: none;
    max-height: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
    background: white;
  }

  dialog:not([data-kind=pdf]) {
    display: none!important;
  }

  .dialog-head,.print-controls {
    display: none!important;
  }

  .dialog-body {
    padding: 0;
  }

  .print-sheet {
    border: 0;
    max-width: none;
    padding: 10mm;
  }

  .print-sheet pre {
    font-size: 11pt;
  }

  .print-sheet .meta {
    font-size: 8pt;
  }

  @page {
    size: A4;
    margin: 14mm;
  }

}

body {
  background: var(--paper);
}

.app-wrap {
  max-width: 1440px;
  margin: auto;
  padding: 20px 30px;
}

.shell {
  box-shadow: none;
}

.mast {
  background: var(--paper);
}

.content {
  min-height: 400px;
}

.nav {
  overflow: auto;
}

.nav button {
  cursor: pointer;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0,1fr) 310px;
  gap: 45px;
  align-items: center;
  margin-bottom: 32px;
}

.hero h1 {
  font-size: 45px;
  max-width: 620px;
}

.hero .photo-wrap {
  height: 240px;
  border-radius: 8px;
}

.actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--wine);
  background: var(--soft);
  padding: 14px 17px;
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.notice strong {
  display: block;
}

.status-error {
  border-color: #b68496;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
  margin: 18px 0;
}

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 18px;
  min-width: 0;
}

.card b {
  display: block;
  font: 29px Prata,serif;
  margin-bottom: 8px;
}

.card span {
  font-size: 12px;
  color: var(--muted);
}

.review-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  padding: 16px;
  margin: 12px 0;
  overflow-wrap: anywhere;
}

.review-row p {
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
  margin: 8px 0;
}

.review-row .meta {
  font-size: 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.7;
  margin: 9px 0;
}

.check input {
  width: auto;
  flex: 0 0 auto;
  margin-top: 4px;
}

.topic-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.topic-grid label {
  font-size: 11px;
}

.topic-grid input {
  width: auto;
}

.review-row textarea {
  min-height: 60px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-grid label {
  display: block;
  font-size: 12px;
  margin: 10px 0;
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 12px;
  margin-top: 16px;
}

.table-scroll {
  overflow: auto;
  max-width: 100%;
}

table {
  border-collapse: collapse;
  font-size: 11px;
  min-width: 520px;
  width: 100%;
}

td,th {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  max-width: 240px;
  overflow-wrap: anywhere;
}

.task-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) 260px;
  gap: 24px;
}

.task-grid textarea {
  min-height: 220px;
  font-size: 13px;
}

.task-grid aside {
  min-width: 0;
}

.task-references { margin: 18px 0; overflow-wrap: anywhere; }
.task-card { background: white; border: 1px solid var(--line); border-radius: 9px; padding: 24px; overflow-wrap: anywhere; }
.task-card h2 { font-size: 25px; line-height: 1.3; margin: 6px 0; }
.task-card-text { white-space: pre-wrap; margin: 18px 0; line-height: 1.65; }
.task-card .source-meta { color: var(--muted); font-size: 12px; }
.task-editor { margin-top: 20px; }
.task-editor > summary { color: var(--wine); padding: 10px 0; }
.task-editor[open] > section { margin-top: 14px; }
.task-references h3 { margin-bottom: 8px; }
.task-reference-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.task-reference-link { color: var(--wine); text-decoration: underline; text-underline-offset: 3px; padding: 5px 0; }
.task-source { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.task-source blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--wine); white-space: pre-wrap; }
.task-source .source-meta { font-size: 12px; color: var(--muted); margin: 6px 0; }
.task-source .source-warning { font-size: 13px; color: var(--wine); }
@media (pointer: coarse) { .task-reference-link { min-height: 44px; display: inline-flex; align-items: center; } }

.history {
  max-height: 240px;
  overflow: auto;
}

.history pre {
  white-space: pre-wrap;
  font: 11px/1.7 'Golos Text',sans-serif;
}

.proposal {
  background: white;
  border: 1px solid #ad6483;
  padding: 20px;
  margin: 15px 0;
  border-radius: 7px;
}

.proposal pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.8 'Golos Text',sans-serif;
}

.chat-line {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.8;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.footer {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin: 20px 0;
}

.footer summary {
  cursor: pointer;
}

.footer a {
  color: var(--wine);
}

.page-status {
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 5;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  white-space: pre-wrap;
}

.page-status:empty {
  display: none;
}

.empty {
  padding: 28px;
  background: var(--soft);
  border-radius: 7px;
  font-size: 13px;
  line-height: 1.8;
}

.paused img {
  animation-play-state: paused!important;
}

progress {
  accent-color: var(--wine);
  width: 100%;
  height: 12px;
}

.upload-grid>* {
  min-width: 0;
}

[hidden] {
  display: none!important;
}

h1,h2,h3,.brand,button {
  overflow-wrap: anywhere;
}

.row-end {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation: none!important;
    transition: none!important;
  }

}

.label-field {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin: 9px 0;
  line-height: 1.7;
}

.label-field>input,.label-field>select,.label-field>textarea {
  display: block;
  margin-top: 5px;
}

.label-field>input[type=checkbox] {
  display: inline-block;
  width: auto;
  margin-left: 8px;
}

.products .product img {
  width: 48px;
  height: 58px;
  object-fit: cover;
}

.products .product {
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  gap: 12px;
}

.products .product>span {
  min-width: 0;
}

.footer {
  display: block;
  padding: 0 4px;
}

.footer p {
  margin: 10px 0;
}

.footer .text-btn {
  margin-top: 8px;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 280px;
  gap: 45px;
}

.upload-layout form {
  min-width: 0;
}

.upload-zone {
  border: 1px dashed #bd8ba1;
  padding: 34px 25px;
  text-align: center;
  border-radius: 10px;
  background: #fffafd;
  margin: 20px 0;
}

.upload-zone.drag {
  background: #f4e0ec;
  border-color: var(--wine);
}

.file-icon {
  width: 64px;
  height: 55px;
  border: 1px solid #c18ca3;
  border-radius: 3px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  color: var(--wine);
  font: 10px 'IBM Plex Mono',monospace;
  background: white;
}

.upload-zone h2 {
  font-size: 18px;
  font-weight: 500;
}

.upload-zone p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 12px 0 19px;
  white-space: pre-line;
}

.file-label {
  cursor: pointer;
}

.upload-layout details {
  margin: 20px 0;
  font-size: 12px;
  line-height: 1.8;
}

.optional {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.optional summary {
  font-size: 14px;
  font-weight: 500;
}

.optional p {
  margin: 12px 0;
  color: var(--muted);
}

.aside-photo {
  height: 320px;
  position: relative;
  overflow: hidden;
  border-radius: 7px;
}

.aside-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: breathe 14s ease-in-out infinite alternate;
}

.photo-label {
  position: absolute;
  bottom: 16px;
  left: 15px;
  right: 15px;
  background: #fffffff2;
  padding: 13px 14px;
}

.photo-label strong {
  font-size: 12px;
  font-weight: 500;
  display: block;
}

.photo-label small {
  font: 9px 'IBM Plex Mono',monospace;
  color: var(--wine);
}

.aside-title {
  font: 22px/1.4 Prata,serif;
  margin-top: 22px;
}

.aside-copy {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.upload-zone:focus-within {
  outline: 3px solid #b45c80;
  outline-offset: 3px;
}

.upload-layout .upload-grid {
  grid-template-columns: 1fr;
}

.review-row .label-field:has(input[type=checkbox]) {
  display: flex;
  gap: 8px;
  align-items: center;
}

.review-row .label-field:has(input[type=checkbox]) input {
  order: -1;
  margin: 0;
}

@media (max-width: 760px) {
  .app-wrap {
    padding: 8px;
  }

  .content {
    padding: 20px 14px;
  }

  .mast {
    padding: 16px 14px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand {
    font-size: 17px;
  }

  .nav {
    padding: 0 14px;
    gap: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero .photo-wrap {
    height: 190px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .products {
    overflow: auto;
    padding-bottom: 5px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow-x: auto;
    max-width: 100%;
  }

  .product {
    min-width: 160px;
  }

  .ticket {
    display: none;
  }

  .cards {
    gap: 7px;
  }

  .card {
    padding: 11px;
  }

  .card b {
    font-size: 24px;
  }

  .card span {
    font-size: 10px;
  }

  .task-grid,.upload-grid {
    grid-template-columns: 1fr;
  }

  .map-grid {
    grid-template-columns: 1fr 1fr;
  }

  .heading {
    display: block;
  }

  h1 {
    font-size: 28px;
  }

  .heading>.meta {
    text-align: left;
    margin-top: 12px;
  }

  .motion {
    white-space: normal;
  }

  .notice {
    padding: 12px;
  }

  .badge {
    white-space: normal;
    font-size: 9px;
  }

  .task-grid textarea {
    min-height: 220px;
  }

  .products .product {
    position: static;
    transform: none;
    margin: 0;
    flex: 0 0 210px;
    min-width: 210px;
    max-width: 210px;
  }

  .upload-layout {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .upload-layout aside {
    display: grid;
    grid-template-columns: 100px minmax(0,1fr);
    gap: 0 18px;
  }

  .upload-layout .aside-photo {
    height: 155px;
    grid-row: 1/4;
  }

  .upload-layout .photo-label {
    display: none;
  }

  .upload-layout .aside-title {
    font-size: 19px;
    margin-top: 0;
  }

  .upload-layout .aside-copy {
    font-size: 11px;
  }

  .upload-zone {
    padding: 27px 16px;
  }

  .products .product img {
    display: block;
    width: 48px;
    height: 58px;
  }

  .products .product strong {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

}

.demo-scenarios {padding:24px; border:1px solid var(--line); border-radius:18px; background:var(--white); margin-bottom:24px;}
.demo-scenarios button {margin:5px;}
.demo-scenarios a {display:inline-block;margin:12px;color:var(--wine);}
.demo-summary {white-space:pre-wrap;}
