:root { color-scheme: light; font-family: Inter, system-ui, sans-serif; color: #242039; background: #f5f5fa; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid #6742d2; outline-offset: 3px; }
.masthead { height: 73px; padding: 0 max(5vw, 20px); border-bottom: 1px solid #e4e1ee; display: flex; align-items: center; justify-content: space-between; background: #fff; }
.brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-size: 22px; font-weight: 750; letter-spacing: -.04em; }
.product { font-weight: 450; color: #69627d; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; margin-right: 3px; border-radius: 11px; background: #623bce; color: white; font-size: 18px; }
.model { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #5c526f; }
.model select { max-width: none; }
main { max-width: 1190px; margin: 0 auto; padding: 65px 32px; }
h1 { font-size: clamp(38px, 6vw, 62px); letter-spacing: -.065em; line-height: 1; margin: 0 0 28px; }
.modes { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: #eae7f3; margin-bottom: 18px; }
.mode { border: 0; padding: 9px 17px; border-radius: 8px; background: transparent; color: #524a67; font-weight: 650; }
.mode[aria-pressed=true] { background: #fff; color: #542bbf; box-shadow: 0 1px 3px #29203c21; }
#url-row { margin-bottom: 18px; }
#url-row label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 650; }
input { width: 100%; padding: 13px 15px; border-radius: 10px; border: 1px solid #d9d4e7; background: white; color: inherit; }
.workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.panel { border: 1px solid #ded9ec; border-radius: 17px; background: #fff; overflow: hidden; box-shadow: 0 5px 18px #28144808; }
.result-panel { background: #f0ecfb; }
.panel-head, .panel-foot { padding: 12px 17px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 53px; }
.panel-head { border-bottom: 1px solid #e6e1ef; font-size: 14px; font-weight: 700; }
.source-panel .panel-head { flex-wrap: wrap; }
.panel-foot { border-top: 1px solid #e6e1ef; color: #645b77; font-size: 13px; }
.result-panel .panel-foot { justify-content: flex-end; }
#detected { color: #625875; font-size: 12px; font-weight: 500; }
select { max-width: 57%; border: 1px solid #d8cdef; border-radius: 8px; padding: 5px 8px; background: #faf8ff; color: #522bb4; }
textarea, .result { display: block; width: 100%; height: 290px; overflow: auto; border: 0; padding: 19px 17px; background: transparent; color: inherit; font-size: 18px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
textarea { resize: none; }
textarea:focus-visible, .result:focus-visible { outline-offset: -3px; }
textarea::placeholder, .empty { color: #726984; }
.quiet { color: #542bbf; background: transparent; border: 0; padding: 4px; font-weight: 650; }
.actions { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#status { margin: 0; color: #54496a; font-size: 14px; }
#status.error { color: #a12548; }
.primary { flex-shrink: 0; border: 0; border-radius: 11px; padding: 12px 18px; background: #623bce; color: #fff; font-weight: 700; }
.primary .arrow { margin-left: 13px; }
@media (max-width: 660px) {
  main { padding: 38px 16px; }
  .workspace { grid-template-columns: 1fr; }
  textarea, .result { height: 200px; }
}
