.tym-orders {
  width: 100%;
  max-width: 1032px;
  min-width: 0;
  color: var(--ink, #151a2d);
}
.tym-orders :is(h1, h2, h3, p, dl, ol) {
  margin: 0;
}
.tym-orders h1 {
  font-size: clamp(2rem, 3.9vw, 3.25rem);
  line-height: 1.07;
  letter-spacing: -.055em;
  overflow-wrap: anywhere;
}
.tym-orders h2 {
  font-size: 1.12rem;
  font-weight: 750;
  letter-spacing: -.018em;
}
.tym-orders h3 {
  font-size: .99rem;
  font-weight: 750;
}
.tym-orders a {
  color: var(--brand, #354ae4);
  text-decoration: underline;
  text-underline-offset: .15em;
}
.to-header {
  align-items: flex-start;
  display: flex;
  gap: 1.15rem;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.to-header p {
  margin-top: .55rem;
}
.to-header > :first-child { min-width: 0; }
.to-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.to-stack {
  display: grid;
  gap: .9rem;
}
.to-box {
  background: #fff;
  border: 1px solid var(--rule, #e5e8f0);
  border-radius: var(--radius, 14px);
  display: grid;
  gap: .9rem;
  padding: clamp(1rem, 2.4vw, 1.45rem);
  min-width: 0;
}
.to-muted {
  color: var(--muted, #59647a);
  font-size: .88rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.to-row {
  align-items: center;
  display: grid;
  gap: .75rem;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  min-width: 0;
}
.to-row + .to-row {
  border-top: 1px solid var(--rule, #e5e8f0);
  padding-top: .9rem;
}
.to-row h3 { overflow-wrap: anywhere; }
.to-row-date {
  color: var(--muted, #59647a);
  font-size: .75rem;
}
.to-button {
  align-items: center;
  background: var(--surface, #f6f7fb);
  border: 1px solid var(--rule, #e5e8f0);
  border-radius: 9px;
  color: var(--ink, #151a2d);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  font-size: .84rem;
  justify-content: center;
  line-height: 1.25;
  max-width: 100%;
  min-height: 44px;
  padding: .6rem .88rem;
  width: fit-content;
}
.to-button:hover {
  border-color: var(--brand, #354ae4);
}
.to-button.is-primary {
  background: var(--brand, #354ae4);
  border-color: var(--brand, #354ae4);
  color: #fff;
}
.to-button.is-primary:hover {
  filter: brightness(.9);
}
.to-button.is-inline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
  margin-left: .5rem;
}
.to-button:disabled {
  cursor: wait;
  opacity: .63;
}
.to-status {
  background: #eff1fd;
  border-radius: 100px;
  color: #2840bd;
  font-size: .75rem;
  font-weight: 800;
  padding: .36rem .64rem;
  width: fit-content;
}
.to-status.is-draft,
.to-status.is-cancelled {
  background: #eef0f4;
  color: #4a5266;
}
.to-status.is-published,
.to-status.is-closed {
  background: #e5f4ed;
  color: #1f6b49;
}
.to-status.is-changes_requested {
  background: #fff2dd;
  color: #7a4f18;
}
.to-milestones {
  background: var(--surface, #f6f7fb);
  border: 1px solid var(--rule, #e5e8f0);
  border-radius: var(--radius, 14px);
  display: grid;
  gap: .85rem;
  margin-bottom: .85rem;
  padding: 1rem;
}
.to-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .45rem;
  padding: 0;
}
.to-progress li {
  list-style: none;
  color: var(--muted, #59647a);
  font-size: .77rem;
  overflow-wrap: anywhere;
}
.to-progress li > span {
  background: #dce1ec;
  border-radius: 10px;
  display: block;
  height: 4px;
  margin-bottom: .42rem;
}
.to-progress .is-past > span { background: #9da9ff; }
.to-progress .is-current { color: var(--ink, #151a2d); font-weight: 800; }
.to-progress .is-current > span { background: var(--brand, #354ae4); }
.tym-orders :is(.to-feedback, .to-error) {
  border-radius: 8px;
  font-size: .88rem;
  line-height: 1.5;
  padding: .7rem .8rem;
}
.tym-orders .to-feedback {
  background: #edf5f1;
  color: #285d46;
  margin: 0 0 .85rem;
}
.to-error {
  background: #fff0ef;
  color: #962e2e;
}
.to-error:empty { display: none; }
.to-error a { margin-left: .45rem; }
.to-form {
  display: grid;
  gap: .9rem;
  justify-items: start;
  min-width: 0;
  width: 100%;
}
.to-fields {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}
.to-fields.is-placement { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.to-fields > :only-child { grid-column: 1 / -1; }
.to-field {
  display: grid;
  align-content: start;
  gap: .4rem;
  min-width: 0;
  font-size: .86rem;
  font-weight: 740;
}
.to-field small {
  color: var(--muted, #59647a);
  font-weight: 500;
  margin-left: .4rem;
}
.to-field :is(input, select, textarea) {
  background: #fff;
  border: 1px solid #d5daea;
  border-radius: 8px;
  color: var(--ink, #151a2d);
  display: block;
  font: inherit;
  font-weight: 500;
  min-height: 44px;
  min-width: 0;
  padding: .6rem .74rem;
  width: 100%;
}
.to-field textarea { resize: vertical; }
.to-field :disabled { opacity: .58; }
.to-field.to-wide { grid-column: 1 / -1; }
.tym-orders :is(button, input, select, textarea, a, summary):focus-visible {
  outline: 2px solid var(--brand, #354ae4);
  outline-offset: 3px;
}
.to-pairs {
  display: grid;
  gap: .68rem;
}
.to-pairs > div {
  display: grid;
  grid-template-columns: minmax(7rem, 26%) minmax(0, 1fr);
  gap: .85rem;
}
.to-pairs dt {
  color: var(--muted, #59647a);
  font-size: .83rem;
}
.to-pairs dd {
  font-size: .86rem;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.to-version,
.to-optional-action {
  border: 1px solid var(--rule, #e5e8f0);
  border-radius: 9px;
  padding: .8rem;
  min-width: 0;
}
.tym-orders summary {
  cursor: pointer;
  font-size: .89rem;
  font-weight: 750;
}
.to-version summary small {
  color: var(--muted, #59647a);
  float: right;
  font-weight: 500;
}
.tym-orders video {
  background: #151a2d;
  border-radius: 8px;
  display: block;
  margin: .85rem 0;
  width: min(100%, 560px);
  max-height: 460px;
  aspect-ratio: 16 / 9;
}
.to-optional-action form,
.to-action-block p + form {
  margin-top: .7rem;
}
.to-action-block + .to-action-block {
  border-top: 1px solid var(--rule, #e5e8f0);
  padding-top: .9rem;
}
.to-history {
  display: grid;
  padding: 0;
  gap: .7rem;
}
.to-history li {
  border-left: 2px solid var(--rule, #e5e8f0);
  padding-left: .7rem;
  display: flex;
  justify-content: space-between;
  gap: .5rem 1rem;
  flex-wrap: wrap;
  font-size: .86rem;
  overflow-wrap: anywhere;
}
.to-history small {
  color: var(--muted, #59647a);
}
@media (max-width: 590px) {
  .to-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .to-fields,
  .to-fields.is-placement { grid-template-columns: minmax(0, 1fr); }
  .to-field :is(input, select, textarea) { font-size: 16px; }
  .to-row {
    grid-template-columns: minmax(0, 1fr) max-content;
  }
  .to-row > :last-child:not(:first-child):not(.to-status) { grid-column: 1 / -1; }
  .to-pairs > div { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
}
