:root{
  font-family:"Segoe UI",system-ui,-apple-system,sans-serif;
  color:#243b50;
  background:#f3f6fa;
  font-synthesis:none;
  --green:#0d6898;
  --navy:#0b3552;
  --border:#dce5ed;
  --muted:#647b8e
}
*{
  box-sizing:border-box
}
body{
  margin:0
}
button,input{
  font:inherit
}
button{
  cursor:pointer
}
button:disabled{
  opacity:.5;
  cursor:wait
}
[hidden]{
  display:none!important
}
a{
  color:inherit
}
button:focus-visible,input:focus-visible,a:focus-visible{
  outline:3px solid #efb356;
  outline-offset:3px
}
.ui-icon{
  width:20px;
  height:20px;
  flex-shrink:0;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  vertical-align:middle
}
.topbar{
  min-height:86px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:16px 36px;
  background:var(--navy);
  color:white;
  border-bottom:3px solid #2189bd
}
.brand{
  display:flex;
  align-items:center;
  gap:22px;
  text-decoration:none;
  min-width:0
}
.lepton-logo{
  width:156px;
  height:auto;
  display:block
}
.brand-product{
  border-left:1px solid #ffffff35;
  padding-left:22px;
  font-size:22px;
  letter-spacing:-.5px;
  white-space:nowrap
}
.brand strong{
  font-weight:650
}
.brand small{
  display:block;
  font-size:9px;
  font-weight:600;
  letter-spacing:1.8px;
  color:#a9c9dd;
  margin-top:5px
}
.topbar-actions{
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0
}
.connection{
  font-size:12px;
  color:#d6e9f5;
  border:1px solid #ffffff24;
  border-radius:20px;
  padding:7px 11px;
  white-space:nowrap
}
.connection:before{
  content:"";
  display:inline-block;
  width:7px;
  height:7px;
  margin-right:7px;
  background:#7acba3;
  border-radius:50%
}
.connection.offline:before{
  background:#efb356
}
.icon-button{
  border:0;
  background:transparent;
  color:var(--green);
  width:44px;
  height:44px;
  display:inline-grid;
  place-items:center;
  font-size:25px;
  border-radius:10px;
  flex-shrink:0
}
.icon-button:hover{
  background:#e9f2f8
}
.topbar .icon-button{
  color:#e5f2fa;
  background:#ffffff0d;
  border:1px solid #ffffff20
}
.topbar .icon-button:hover{
  background:#ffffff20
}
.topbar .quiet{
  color:#e5f2fa;
  border-color:#ffffff30
}
.topbar .quiet:hover{
  background:#ffffff18
}
.layout{
  display:grid;
  grid-template-columns:256px minmax(0,1fr);
  max-width:1500px;
  margin:auto;
  min-height:calc(100vh - 86px)
}
.library{
  padding:28px 22px;
  background:#fff;
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column
}
.library-heading,.section-heading,.workspace-heading,.dialog-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px
}
.library-heading{
  margin-bottom:18px
}
.library h2{
  font-size:16px;
  margin:0;
  font-weight:650
}
.count{
  display:inline-grid;
  place-items:center;
  min-width:27px;
  height:27px;
  padding:0 8px;
  border-radius:8px;
  background:#eaf2f8;
  color:#376783;
  font-size:12px;
  font-weight:650
}
.button{
  min-height:46px;
  border-radius:10px;
  padding:12px 17px;
  border:1px solid transparent;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  font-size:13px;
  font-weight:600;
  line-height:1.35;
  transition:background .15s,border-color .15s
}
.primary{
  background:var(--green);
  color:#fff;
  box-shadow:0 3px 8px #0d689814
}
.primary:hover{
  background:#085580
}
.secondary{
  border-color:#c4d6e3;
  background:#fff;
  color:#185a80
}
.secondary:hover{
  background:#f0f7fc;
  border-color:#8eb5ce
}
.quiet{
  background:transparent;
  color:var(--muted)
}
.quiet:hover{
  background:#ecf3f8
}
.danger{
  color:#b04b44
}
.full{
  width:100%
}
.project-list{
  margin:22px -5px;
  display:grid;
  gap:8px
}
.project-item{
  background:none;
  border:1px solid transparent;
  border-radius:11px;
  padding:15px 15px 15px 18px;
  text-align:left;
  color:#324f66;
  min-width:0;
  position:relative
}
.project-item.active{
  background:#edf5fc;
  border-color:#cfe3f2
}
.project-item.active:before{
  content:"";
  position:absolute;
  left:0;
  top:13px;
  bottom:13px;
  width:3px;
  border-radius:2px;
  background:#1680b4
}
.project-item:hover{
  background:#f1f6fa
}
.project-item strong{
  display:block;
  font-size:14px;
  overflow-wrap:anywhere
}
.project-item span{
  display:block;
  margin-top:8px;
  font-size:11px;
  color:var(--muted)
}
.library-footer{
  margin-top:auto;
  padding-top:28px
}
.library-footer p{
  font-size:11px;
  line-height:1.7;
  color:var(--muted);
  padding:0 5px
}
.lepton-link{
  display:block;
  margin-top:22px;
  padding-top:16px;
  border-top:1px solid var(--border);
  text-decoration:none;
  color:#658397;
  font-size:10px;
  line-height:1.6
}
.lepton-link:hover{
  color:var(--green)
}
.workspace{
  padding:32px 38px 36px;
  min-width:0
}
.workspace-heading{
  margin-bottom:24px
}
.eyebrow{
  color:#5682a0;
  letter-spacing:1.6px;
  font-size:10px;
  font-weight:700;
  margin:0 0 8px
}
h1{
  font-size:29px;
  letter-spacing:-.7px;
  margin:0;
  font-weight:650;
  overflow-wrap:anywhere;
  line-height:1.25
}
.save-status{
  font-size:11px;
  line-height:1.5;
  color:#567f73;
  text-align:right;
  max-width:170px
}
.save-status.error{
  color:#aa4030
}
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:0 3px 12px #243b5004
}
.card-title{
  margin:0;
  padding-bottom:15px;
  border-bottom:1px solid #edf2f6;
  font-size:14px;
  font-weight:650;
  color:#36576e
}
.project-details{
  padding:23px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px
}
label{
  display:block;
  font-size:12px;
  font-weight:600;
  color:#4c657a
}
input:not([type=file]){
  width:100%;
  display:block;
  background:#f8fafc;
  border:1px solid #d6e1eb;
  border-radius:9px;
  padding:12px;
  margin-top:8px;
  min-height:46px;
  color:#243b50;
  font-size:15px;
  transition:border-color .15s,background .15s
}
input:not([type=file]):focus{
  background:#fff;
  border-color:#78aeca
}
input::placeholder{
  color:#8598a8
}
input.invalid{
  border-color:#bf6250;
  background:#fff8f5
}
.wide{
  grid-column:1/-1
}
.hint{
  font-size:10px;
  font-weight:400;
  color:#7f93a3;
  margin-left:8px
}
.section-heading{
  margin:30px 0 17px
}
.section-heading h2{
  font-size:18px;
  font-weight:650;
  letter-spacing:-.3px;
  margin:0
}
.section-heading .count{
  vertical-align:middle;
  margin-left:8px
}
.section-heading p{
  font-size:12px;
  color:var(--muted);
  margin:8px 0 0;
  line-height:1.5
}
.opening-card{
  margin-bottom:18px;
  overflow:hidden
}
.opening-heading{
  padding:15px 22px;
  border-bottom:1px solid #e6eef5;
  background:#fafdff;
  display:flex;
  align-items:center;
  justify-content:space-between
}
.opening-heading-left{
  display:flex;
  gap:12px;
  align-items:center
}
.opening-number{
  background:#e0effa;
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:9px;
  font-size:12px;
  color:#176c9b;
  font-weight:700
}
.opening-heading h3{
  font-size:15px;
  margin:0;
  font-weight:650
}
.remove-opening{
  min-height:40px;
  min-width:40px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  font-size:23px;
  color:#849aaa
}
.remove-opening:hover{
  color:#a34c3a;
  background:#fbefec;
  border-color:#f4d9d4
}
.opening-content{
  padding:21px 22px
}
.measurements{
  display:grid;
  grid-template-columns:minmax(90px,1fr) minmax(90px,1fr) minmax(120px,1.4fr);
  gap:16px
}
.measure-input{
  position:relative
}
.measure-input input{
  padding-right:40px;
  font-size:19px;
  font-weight:600;
  letter-spacing:.2px
}
.measure-input span{
  position:absolute;
  right:13px;
  bottom:16px;
  font-size:11px;
  font-weight:400;
  color:#7892a5
}
.media-area{
  margin-top:22px;
  padding-top:19px;
  border-top:1px solid #edf2f6;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center
}
.media-area .button{
  font-size:12px;
  min-height:44px;
  padding:10px 13px
}
.media-area [data-action=camera],.media-area [data-action=record]{
  background:#f0f7fc;
  border-color:#c5dded
}
.media-area .quiet{
  border-color:#e5edf3;
  background:#fff
}
.media-note{
  font-size:11px;
  color:#7891a3;
  width:100%;
  margin-top:2px
}
.photo-grid{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top:15px
}
.photo-tile{
  position:relative;
  width:120px;
  height:94px;
  margin:0;
  background:#eef3f7;
  border-radius:10px;
  overflow:hidden
}
.photo-tile img{
  width:100%;
  height:100%;
  object-fit:cover
}
.remove-photo{
  position:absolute;
  top:5px;
  right:5px;
  width:30px;
  height:30px;
  background:#fff;
  border:0;
  border-radius:50%;
  font-size:20px;
  color:#954b44;
  box-shadow:0 2px 8px #0002
}
.audio-row{
  margin-top:15px;
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap
}
.audio-row audio{
  height:40px;
  max-width:100%;
  width:280px
}
.audio-status{
  font-size:11px;
  color:var(--muted)
}
.media-area .recording{
  background:#b84740!important;
  border-color:#b84740!important;
  color:white
}
.recording-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#e8564b
}
.no-openings{
  padding:35px;
  border:1px dashed #b8cedf;
  border-radius:13px;
  text-align:center;
  font-size:14px;
  color:var(--muted)
}
.project-bottom{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin:14px 0 22px
}
.project-bottom .button{
  font-size:12px
}
.export-bar{
  position:static;
  padding:23px;
  background:#e7f1fa;
  border:1px solid #cadfed;
  border-radius:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px
}
.export-bar strong{
  display:block;
  font-size:17px;
  font-weight:650;
  color:#214e6a
}
.export-bar>div>span{
  display:block;
  font-size:12px;
  color:#5f7c90;
  margin-top:7px
}
.export-bar .eyebrow{
  font-size:9px;
  margin-bottom:6px
}
.export-actions{
  display:flex;
  gap:10px;
  flex-shrink:0
}
.export-actions .button{
  min-height:46px
}
.empty-state{
  min-height:calc(100vh - 190px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  max-width:560px;
  margin:auto;
  padding:20px 0
}
.empty-drawing{
  position:relative;
  width:235px;
  margin-bottom:30px;
  background:#e7f2fa;
  border:1px solid #d6e7f4;
  border-radius:24px;
  transform:rotate(-3deg);
  padding:12px 12px 20px
}
.empty-drawing svg{
  width:100%;
  display:block;
  fill:none;
  stroke:#1479ab;
  stroke-width:3;
  stroke-linecap:round;
  stroke-linejoin:round
}
.empty-drawing .drawing-guide{
  stroke:#c7ddea;
  stroke-width:1;
  stroke-dasharray:4 5
}
.empty-drawing .drawing-measure{
  stroke:#7fa9c4;
  stroke-width:2
}
.empty-drawing .drawing-point{
  fill:#f0b360;
  stroke:white;
  stroke-width:2
}
.drawing-label{
  font-size:8px;
  font-weight:700;
  letter-spacing:1.5px;
  color:#5a839d;
  display:block;
  transform:rotate(3deg)
}
.empty-state h1{
  font-size:37px;
  line-height:1.2;
  color:#193f59
}
.empty-state>p:not(.eyebrow){
  font-size:14px;
  line-height:1.8;
  color:var(--muted);
  max-width:395px;
  margin:21px 0 25px
}
.empty-state .button{
  padding:14px 23px
}
.empty-note{
  font-size:11px;
  color:#708b9d;
  margin-top:19px;
  line-height:1.6
}
.toast{
  position:fixed;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  max-width:min(600px,calc(100% - 32px));
  z-index:20;
  padding:16px 22px;
  border-radius:11px;
  background:#153e58;
  color:white;
  font-size:13px;
  box-shadow:0 6px 30px #0003;
  line-height:1.5
}
.toast.error{
  background:#8a4034
}
dialog{
  border:1px solid var(--border);
  border-radius:16px;
  padding:26px;
  max-width:470px;
  width:calc(100% - 32px);
  color:#243b50;
  box-shadow:0 20px 80px #0002
}
dialog::backdrop{
  background:#102f4875;
  backdrop-filter:blur(3px)
}
dialog h2{
  font-size:20px;
  margin:0
}
dialog p{
  font-size:13px;
  line-height:1.7;
  color:var(--muted);
  margin:16px 0 22px
}
.dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:24px
}
@media(min-width:1350px){
  .workspace{
    padding:36px 48px 40px
  }
  .project-details{
    grid-template-columns:1fr 1fr 1.4fr
  }
  .project-details .wide:not(.card-title){
    grid-column:auto
  }
}
@media(max-width:1080px){
  .topbar{
    padding:16px 24px
  }
  .layout{
    grid-template-columns:230px minmax(0,1fr)
  }
  .workspace{
    padding:28px 25px
  }
  .export-bar{
    flex-direction:column;
    align-items:stretch
  }
  .export-actions .button{
    flex:1
  }
  .measurements{
    grid-template-columns:1fr 1fr
  }
  .measurements>label:last-child{
    grid-column:1/-1
  }
}
@media(max-width:760px){
  .topbar{
    flex-wrap:wrap;
    gap:12px;
    padding:18px 20px
  }
  .brand{
    gap:17px
  }
  .brand-product{
    padding-left:17px;
    font-size:20px
  }
  .lepton-logo{
    width:135px
  }
  .topbar-actions{
    margin-left:auto
  }
  .layout{
    display:block
  }
  .library{
    padding:20px 20px 13px;
    border-right:0;
    border-bottom:1px solid var(--border);
    display:grid;
    grid-template-columns:1fr auto;
    gap:12px
  }
  .library-heading{
    margin:0
  }
  .library>.button{
    width:auto;
    min-height:44px;
    padding:10px 14px;
    font-size:12px
  }
  .project-list{
    grid-column:1/-1;
    display:flex;
    overflow-x:auto;
    margin:0;
    gap:9px;
    padding:3px 0
  }
  .project-item{
    min-width:160px;
    max-width:235px;
    padding:13px 16px;
    flex-shrink:0
  }
  .library-footer{
    grid-column:1/-1;
    padding:0;
    display:flex;
    align-items:center;
    justify-content:flex-end
  }
  .library-footer .button{
    width:auto;
    min-height:44px;
    padding:8px 10px;
    font-size:11px
  }
  .library-footer p,.lepton-link{
    display:none
  }
  .workspace{
    padding:25px 20px 30px
  }
  .workspace-heading{
    align-items:flex-start;
    flex-direction:column;
    gap:9px;
    margin-bottom:20px
  }
  .save-status{
    text-align:left;
    max-width:none
  }
  h1{
    font-size:25px
  }
  .project-details{
    padding:20px;
    gap:18px;
    grid-template-columns:1fr
  }
  .hint{
    display:block;
    margin:4px 0 0
  }
  .section-heading{
    margin:27px 0 17px;
    align-items:flex-start
  }
  .section-heading h2{
    font-size:16px
  }
  .section-heading p{
    font-size:11px;
    max-width:185px
  }
  .section-heading .button{
    font-size:12px;
    white-space:nowrap;
    padding:10px 12px;
    min-height:44px
  }
  .opening-heading{
    padding:13px 18px
  }
  .opening-content{
    padding:19px 18px
  }
  .measurements{
    gap:17px 14px
  }
  .media-area{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px
  }
  .media-area .button{
    padding:11px 8px;
    font-size:12px;
    min-height:46px;
    gap:6px
  }
  .media-area [data-action=camera]{
    grid-column:1;
    grid-row:1
  }
  .media-area [data-action=record]{
    grid-column:2;
    grid-row:1
  }
  .media-area [data-action=gallery]{
    grid-column:1;
    grid-row:2
  }
  .media-area [data-action=audio-file]{
    grid-column:2;
    grid-row:2
  }
  .media-note{
    grid-column:1/-1;
    text-align:center;
    font-size:10px;
    line-height:1.5
  }
  .export-bar{
    padding:20px;
    gap:18px
  }
  .export-actions{
    flex-direction:column;
    gap:10px
  }
  .export-actions .button{
    font-size:13px;
    min-height:48px
  }
  .empty-state{
    min-height:55vh;
    padding:25px 0
  }
  .empty-state h1{
    font-size:31px
  }
  .empty-drawing{
    width:190px;
    margin-bottom:23px
  }
  .empty-note{
    max-width:260px
  }
}
@media(max-width:460px){
  .topbar{
    padding:16px;
    gap:12px
  }
  .brand{
    width:100%;
    gap:15px
  }
  .lepton-logo{
    width:122px
  }
  .brand-product{
    padding-left:15px;
    font-size:19px
  }
  .brand small{
    font-size:8px;
    letter-spacing:1.1px
  }
  .topbar-actions{
    width:100%;
    gap:8px
  }
  .topbar-actions .connection{
    margin-right:auto
  }
  .topbar-actions .button{
    padding:9px 12px;
    min-height:42px;
    font-size:12px
  }
  .library{
    padding:18px 16px 10px
  }
  .workspace{
    padding:24px 16px
  }
  .section-heading .button{
    padding:10px;
    font-size:11px
  }
  .section-heading p{
    max-width:170px
  }
  .project-details{
    padding:18px
  }
  .project-bottom{
    gap:0
  }
  .project-bottom .button{
    padding:10px 8px;
    font-size:11px
  }
}
@media(prefers-reduced-motion:reduce){
  *{
    transition:none!important
  }
}
