@font-face {
  font-family: Plex;
  src: url("assets/IBMPlexSansArabic-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap
}

@font-face {
  font-family: Plex;
  src: url("assets/IBMPlexSansArabic-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap
}

@font-face {
  font-family: Plex;
  src: url("assets/IBMPlexSansArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap
}

:root {
  --paper: #f7f7f3;
  --surface: #fff;
  --ink: #202c3c;
  --muted: #586571;
  --faint: #737c84;
  --navy: #1e294b;
  --teal: #17665a;
  --teal-pale: #eaf3ef;
  --sand: #f7efd9;
  --gold: #b79554;
  --line: #dfe3e0;
  --danger: #903d34;
  --radius: 12px;
  --touch: 42px;
  color-scheme: light;
  font-family: Plex,Tahoma,Arial,sans-serif;
  color: var(--ink);
  font-size: 16px;
}

* {
  box-sizing: border-box
}

html {
  min-height: 100%;
  background: var(--paper);
  scroll-padding-top: 18px
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.5
}

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

button,a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation
}

a {
  color: inherit;
  text-decoration: none
}

button {
  cursor: pointer
}

button:disabled {
  opacity: .55;
  cursor: wait
}

button {
  background: none;
  border: 0
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
  outline: 3px solid #2c8077;
  outline-offset: 3px
}

button:active,.primary:active,.secondary:active {
  transform: translateY(1px)
}

[hidden] {
  display: none!important
}

h1,h2,h3,p {
  margin: 0
}

h1,h2,h3 {
  line-height: 1.35;
  text-wrap: balance
}

strong,b {
  font-weight: 600
}

h1 {
  font-size: 35px;
  font-weight: 700
}

h2 {
  font-size: 22px;
  font-weight: 600
}

h3 {
  font-size: 18px;
  font-weight: 600
}

small {
  font-size: 13px
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: none;
  fill: currentColor;
  vertical-align: middle
}

.icon-bank {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none
}

.mono,.feature-time b,.row-when {
  font-variant-numeric: tabular-nums
}

.skip {
  position: fixed;
  top: -80px;
  right: 8px;
  background: white;
  padding: 8px;
  z-index: 20
}

.skip:focus {
  top: 8px
}

::selection {
  background: #d4e6e1
}

.frame,.mast-inner {
  width: min(1280px,calc(100% - 88px));
  margin-inline: auto
}

#masthead {
  background: #fff;
  border-bottom: 1px solid var(--line)
}

.mast-inner {
  display: flex;
  gap: 34px;
  align-items: center;
  min-height: 76px
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none
}

.brand img {
  width: 43px;
  height: 47px;
  object-fit: contain;
  background: #202955;
  border-radius: 5px;
  padding: 3px
}

.brand span {
  display: grid;
  line-height: 1.2
}

.brand strong {
  font-size: 21px;
  font-weight: 700;
  color: var(--navy)
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px
}

.top-nav {
  display: flex;
  align-self: stretch;
  gap: 3px;
  margin-inline: 20px auto
}

.top-nav a,#mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 600;
  color: var(--muted);
  position: relative
}

.top-nav a {
  min-height: 44px;
  padding: 0 14px
}

.top-nav a .icon {
  width: 18px;
  height: 18px
}

.top-nav a:hover,.mast-tools button:hover {
  color: var(--teal)
}

.top-nav a[aria-current] {
  color: var(--teal)
}

.top-nav a[aria-current]:after {
  content: "";
  position: absolute;
  inset-inline: 13px;
  height: 3px;
  bottom: 0;
  border-radius: 4px 4px 0 0;
  background: var(--teal)
}

.mast-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-inline-start: auto
}

.tool-search {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  height: 42px
}

.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  border-inline-start: 1px solid var(--line);
  padding-inline-start: 17px
}

.demo-label i {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%
}

#mobile-nav {
  display: none
}

#workspace {
  min-height: calc(100vh - 167px);
  outline: 0
}

.page-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-block: 32px 24px;
  min-width: 0
}

.page-head>div {
  min-width: 0
}

.page-head h1 {
  overflow-wrap: anywhere
}

.page-head .sub {
  color: var(--muted);
  font-size: 15px;
  margin-top: 4px
}

.date-divider {
  color: #a5a9a7;
  padding-inline: 9px
}

.head-actions,.row-actions,.day-nav {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap
}

.primary,.secondary,.small-button,.icon-button,.feature-link,.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: 8px;
  line-height: 1.3;
  transition: background .14s ease,color .14s ease,transform .14s ease
}

.primary,.secondary {
  min-height: 44px;
  padding: 9px 18px;
  white-space: nowrap
}

.primary {
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal)
}

.primary:hover {
  background: #104f46
}

.primary .icon {
  width: 18px
}

.secondary,.small-button {
  background: var(--surface);
  border: 1px solid #d5dcd8
}

.secondary:hover,.small-button:hover,.icon-button:hover {
  background: #edf2ee
}

.small-button {
  min-height: 36px;
  font-size: 13px;
  padding: 6px 11px
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted)
}

.text-link {
  font-size: 14px;
  color: var(--teal);
  min-height: 36px
}

.text-link:hover,a.crumb:hover {
  text-decoration: underline
}

.text-link .icon {
  width: 15px
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--teal);
  margin-bottom: 9px;
  font-size: 14px
}

.crumb .icon {
  width: 14px;
  height: 14px
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(278px,31%);
  align-items: start;
  gap: 28px
}

.main-col,.side-col {
  min-width: 0
}

.side-col {
  display: grid;
  gap: 24px
}

.section-block {
  margin-top: 23px
}

.section-block.flat {
  margin-top: 0
}

.section-heading,.calendar-heading,.month-box header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between
}

.section-heading {
  margin-bottom: 9px
}

.section-heading h2,.case-facts h2,.month-box h2,.aside-note h2 {
  display: flex;
  align-items: center;
  gap: 8px
}

.section-heading h2>.icon,.case-facts h2>.icon,.month-box h2>.icon {
  width: 20px;
  height: 20px
}

.feature {
  display: flex;
  align-items: stretch;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 15px;
  color: white;
  background: #242e50;
  min-height: 176px;
  padding: 23px 26px;
  gap: 20px
}

.feature:after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 6%;
  top: -73px;
  width: 245px;
  height: 324px;
  background: url('assets/office-mark.png') center/contain no-repeat;
  mix-blend-mode: screen;
  opacity: .075;
  pointer-events: none
}

.feature-copy {
  flex: 1;
  min-width: 0
}

.feature-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f1d9a5;
  font-size: 14px;
  font-weight: 600
}

.feature-kicker>.icon {
  width: 18px
}

.feature-ref {
  margin-inline-start: 4px;
  padding-inline-start: 12px;
  border-inline-start: 1px solid #697085;
  color: #d9dce2;
  font-weight: 400;
  font-size: 12px
}

.feature h2 {
  margin: 10px 0 8px;
  font-size: 25px;
  line-height: 1.4;
  font-weight: 600
}

.feature-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: #e2e3e7;
  font-size: 13px
}

.feature-meta span {
  display: inline-flex;
  gap: 5px;
  align-items: center
}

.feature-meta .icon {
  width: 15px;
  height: 15px
}

.feature-link {
  margin-top: 8px;
  min-height: 36px;
  color: #f2dba9;
  font-size: 14px
}

.feature-link:hover {
  color: #fff
}

.feature-link .icon {
  width: 16px
}

.feature-time {
  align-self: center;
  border-inline-start: 1px solid #626a82;
  padding-inline-start: 20px;
  display: grid;
  justify-items: center;
  flex: none;
  min-width: 123px
}

.feature-time b {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -1.5px;
  line-height: 1.2;
  margin: 5px 0
}

.feature-time span,.feature-time small {
  color: #d9dce3;
  font-size: 12px
}

.month-box,.case-facts {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 20px
}

.month-box h2,.case-facts h2,.attention h2,.aside-note h2 {
  font-size: 18px
}

.month-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  direction: rtl
}

.month-nav .icon-button {
  width: 34px;
  height: 34px
}

.month-nav .icon {
  width: 15px
}

.week-labels,.months-grid {
  display: grid;
  grid-template-columns: repeat(7,minmax(0,1fr));
  text-align: center;
  align-items: center;
  justify-items: center
}

.week-labels {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 4px
}

.months-grid a {
  position: relative;
  display: grid;
  place-items: center;
  height: 36px;
  width: 100%;
  max-width: 40px;
  border-radius: 8px;
  font-size: 15px;
  font-variant-numeric: tabular-nums
}

.months-grid a:hover {
  background: var(--teal-pale)
}

.months-grid a.today {
  color: var(--teal);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #99bfb2
}

.months-grid a.picked {
  background: var(--teal);
  color: #fff;
  box-shadow: none
}

.months-grid i,.calendar-key i,.late-dot {
  height: 5px;
  width: 5px;
  display: inline-block;
  border-radius: 50%;
  background: var(--teal)
}

.months-grid i {
  position: absolute;
  bottom: 3px
}

.months-grid i.hearing,.calendar-key span:first-child i {
  background: #aa8239
}

.months-grid .picked i {
  background: white
}

.calendar-key {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px
}

.calendar-key span {
  display: flex;
  align-items: center;
  gap: 5px
}

.attention,.aside-note {
  padding-inline: 3px
}

.attention h2 .icon {
  color: #a36e24
}

.attention-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-block-start: 1px solid var(--line)
}

.attention-row strong,.attention-row small,.directory-row small,.team-row small,.hit small {
  display: block
}

.attention-row small,.directory-row small,.team-row small,.hit small {
  color: var(--muted);
  font-size: 13px
}

.attention-row>.icon {
  width: 15px;
  color: var(--muted)
}

.attention-row:hover strong,.file-row:hover strong,.directory-row:hover strong,.row-title:hover,.hit:hover strong,.case-facts dd a:hover {
  color: var(--teal);
  text-decoration: underline
}

.event-row {
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  min-height: 69px
}

.event-row:last-of-type {
  border-bottom: 1px solid var(--line);
  border-end-end-radius: 9px;
  border-end-start-radius: 9px
}

.event-row:first-of-type,.section-heading+.event-row,.day-nav+.event-row,.day-group+.event-row {
  border-start-end-radius: 9px;
  border-start-start-radius: 9px
}

.row-kind,.client-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 9px;
  color: var(--teal);
  background: var(--teal-pale)
}

.row-kind.hearing {
  background: #f5eedc;
  color: #916c2f
}

.row-kind.delivery,.row-kind.deadline {
  background: #edeef6;
  color: #545e8a
}

.row-content,.row-content>*,.file-row>div,.file-row strong,.directory-row strong,.hit strong {
  min-width: 0;
  overflow-wrap: anywhere
}

.row-content strong,.row-title {
  font-size: 16px;
  font-weight: 600
}

.row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px
}

.row-meta span+span:before {
  content: "·";
  padding-inline: 5px;
  color: #888
}

.row-when {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 13px
}

.row-when small {
  color: var(--muted)
}

.late-dot {
  background: var(--danger)
}

.open-chevron {
  width: 29px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--muted);
  border-radius: 6px
}

.open-chevron .icon {
  width: 15px
}

.open-chevron:hover {
  background: var(--teal-pale)
}

.selected-event {
  box-shadow: inset -3px 0 var(--teal);
  background: #f6faf7
}

.event-row:target {
  box-shadow: inset -3px 0 var(--teal)
}

.prep {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px
}

.empty {
  padding: 24px 14px;
  background: #fff;
  border: 1px dashed #cdd6cf;
  border-radius: 8px;
  color: var(--muted)
}

.empty strong {
  color: var(--ink);
  font-size: 15px
}

.empty p {
  font-size: 14px;
  margin-top: 5px
}

.file-list {
  border-block: 1px solid var(--line)
}

.file-list-head,.file-row {
  display: grid;
  grid-template-columns: minmax(0,1.7fr) minmax(100px,.78fr) minmax(100px,.75fr) 14px;
  gap: 12px;
  align-items: center;
  padding: 10px 9px
}

.file-list-head {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600
}

.file-row {
  background: var(--surface);
  border-block-start: 1px solid var(--line)
}

.file-row>div:first-child {
  display: grid;
  gap: 1px
}

.file-row strong {
  font-size: 15px
}

.file-code {
  font-size: 12px;
  font-weight: 600;
  color: #697382;
  font-variant-numeric: tabular-nums
}

.muted {
  font-size: 13px;
  color: var(--muted)
}

.owner-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px
}

.avatar-chip,.client-icon {
  flex: none
}

.avatar-chip {
  display: grid;
  place-items: center;
  background: #e5eae7;
  color: #485e59;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600
}

.next-cell {
  display: grid;
  justify-items: start;
  font-size: 13px;
  color: var(--muted);
  gap: 3px
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 5px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: #345f54;
  background: #e5f0eb
}

.badge.hearing {
  background: #f5ecd6;
  color: #785621
}

.badge.delivery,.badge.deadline {
  background: #eaeaf4;
  color: #515a84
}

.file-arrow {
  width: 13px;
  color: var(--muted)
}

.list-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px
}

.list-tools select,.search-box,.field input,.field select,.field textarea {
  border: 1px solid #cbd3ce;
  border-radius: 8px;
  background: #fff;
  font: inherit
}

.list-tools select {
  min-height: 44px;
  padding: 4px 12px;
  max-width: 145px
}

.search-box {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding-inline: 12px;
  width: min(430px,100%);
  color: var(--muted)
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  font: inherit;
  outline: none;
  padding-block: 8px
}

.search-box:focus-within {
  outline: 2px solid var(--teal);
  outline-offset: 1px
}

.search-box input:focus-visible {
  outline: none
}

.calendar-heading {
  margin-bottom: 10px
}

.seg {
  display: flex;
  gap: 3px;
  background: #e9ede8;
  border-radius: 8px;
  padding: 3px
}

.seg button {
  font-size: 14px;
  border-radius: 6px;
  min-width: 49px;
  min-height: 35px;
  color: var(--muted)
}

.seg button[aria-pressed="true"] {
  background: #fff;
  color: var(--teal);
  box-shadow: 0 1px 3px #19292d1c;
  font-weight: 600
}

.day-nav {
  margin-bottom: 14px;
  gap: 4px
}

.day-nav .icon {
  width: 15px
}

.day-group {
  font-size: 15px;
  color: var(--muted);
  margin: 16px 0 6px
}

.directory,.team-row {
  max-width: 920px
}

.directory-row,.team-row,.hit {
  display: flex;
  align-items: center;
  gap: 14px;
  background: white;
  border-block-end: 1px solid var(--line);
  padding: 13px 15px;
  min-height: 63px
}

.directory-row:first-child,.team-row:first-child {
  border-block-start: 1px solid var(--line)
}

.directory-row>.icon,.hit>.icon {
  width: 15px;
  color: var(--muted)
}

.file-count {
  display: flex;
  gap: 6px;
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 14px
}

.file-count b {
  color: var(--ink)
}

.team-row span:nth-child(2) {
  flex: 1
}

.team-row>div {
  font-size: 13px;
  color: var(--muted)
}

.team-row div b {
  color: var(--ink)
}

.case-next {
  background: var(--teal-pale);
  border-radius: 10px;
  padding: 15px 19px
}

.case-next .section-heading {
  margin-bottom: 4px
}

.case-next .section-heading h2 {
  font-size: 15px;
  color: var(--teal)
}

.case-next .section-heading .icon {
  width: 15px
}

.case-next h3 {
  font-size: 23px
}

.case-next p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px
}

.case-next p span {
  padding-inline: 4px
}

.case-facts dl {
  margin: 11px 0 0
}

.case-facts dl div {
  display: grid;
  grid-template-columns: minmax(60px,.72fr) minmax(0,1.5fr);
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-block: 10px;
  font-size: 14px
}

.case-facts dt {
  color: var(--muted)
}

.case-facts dd {
  margin: 0;
  overflow-wrap: anywhere
}

.case-facts dd a {
  color: var(--teal)
}

.history-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-block-start: 1px solid var(--line);
  min-width: 0
}

.history-item>div {
  min-width: 0
}

.history-icon {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 31px;
  height: 31px;
  flex: none;
  background: #fff;
  color: var(--teal)
}

.history-icon .icon {
  width: 16px
}

.history-item small,.aside-note small {
  color: var(--muted);
  font-size: 13px
}

.history-item h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 3px;
  font-size: 16px
}

.history-item h3 span {
  font-size: 12px;
  font-weight: 400;
  color: var(--teal)
}

.history-item p,.aside-note p,.move-note {
  color: var(--muted);
  font-size: 14px;
  white-space: pre-line;
  overflow-wrap: anywhere;
  margin-top: 4px
}

.move-note .icon {
  width: 15px
}

.move-note {
  padding: 8px 0
}

.aside-note p {
  margin: 8px 0
}

#foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  padding-block: 17px 20px;
  margin-top: 25px;
  border-top: 1px solid var(--line)
}

#foot>span,#foot>div,#foot a {
  display: flex;
  align-items: center;
  gap: 6px
}

#foot>div {
  gap: 17px
}

#foot .icon {
  width: 16px;
  height: 16px
}

#foot a:hover {
  color: var(--teal);
  text-decoration: underline
}

.editor-dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 15px;
  width: min(555px,calc(100% - 28px));
  max-width: 100vw;
  max-height: min(91dvh,850px);
  color: var(--ink);
  box-shadow: 0 16px 72px #0d1c2b3b;
  background: #fff;
  overflow: hidden
}

.editor-dialog::backdrop {
  background: #16233276
}

.editor-form {
  display: flex;
  flex-direction: column;
  max-height: min(90dvh,848px)
}

.dialog-head,.dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 15px 21px
}

.dialog-head {
  border-bottom: 1px solid var(--line)
}

.dialog-head h2 {
  font-size: 22px
}

.dialog-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px
}

.dialog-body {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 19px 21px;
  min-height: 0;
  scrollbar-gutter: stable
}

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

.fields>.full {
  grid-column: 1/-1
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0
}

.field>span,.kind-field legend {
  font-size: 14px;
  font-weight: 600
}

.field input,.field select,.field textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  padding: 7px 10px;
  line-height: 1.4;
  font-size: 15px
}

.field textarea {
  resize: vertical;
  min-height: 69px
}

.field input[type=time],.field input[type=date] {
  text-align: right;
  direction: ltr
}

.editor-form :user-invalid {
  border-color: var(--danger)
}

.dialog-body>.field+.field,.dialog-body>.fields+.field {
  margin-top: 14px
}

.kind-field {
  border: 0;
  padding: 0;
  margin: 13px 0 15px;
  min-width: 0
}

.kind-field:first-child {
  margin-top: 0
}

.kind-field legend {
  margin-bottom: 7px
}

.kind-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px
}

.kind-choice {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 42px;
  padding: 7px;
  border: 1px solid #d3dbd6;
  border-radius: 7px;
  cursor: pointer;
  font-size: 14px
}

.kind-choice:has(input:checked) {
  color: #104e43;
  border-color: var(--teal);
  background: var(--teal-pale);
  font-weight: 600
}

.kind-choice:has(input:focus-visible) {
  outline: 3px solid #397c6e;
  outline-offset: 2px
}

.kind-choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer
}

.kind-choice .icon {
  width: 17px
}

.dialog-foot {
  border-top: 1px solid var(--line);
  justify-content: flex-start;
  background: #fcfcfa
}

.clash,.form-error,.form-context {
  line-height: 1.5;
  font-size: 14px
}

.clash {
  background: #fbf2dc;
  color: #75571d;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 10px
}

.form-error {
  color: var(--danger);
  margin-top: 9px
}

.form-context {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  margin: 0 0 14px
}

.search-dialog .dialog-body {
  max-height: 66vh
}

.search-dialog .search-box {
  width: 100%
}

.search-hits {
  margin-top: 13px
}

.hit {
  justify-content: space-between;
  padding-inline: 3px
}

.hit>span {
  min-width: 0
}

#notice {
  position: fixed;
  z-index: 9;
  bottom: 23px;
  left: 50%;
  transform: translate(-50%,12px);
  opacity: 0;
  transition: opacity .14s ease,transform .14s ease;
  pointer-events: none;
  color: white;
  background: #1e3443;
  padding: 10px 17px;
  border-radius: 8px;
  max-width: calc(100% - 32px);
  width: max-content;
  font-size: 14px
}

#notice.on {
  opacity: 1;
  transform: translate(-50%,0)
}

.portal-frame {
  max-width: 790px;
  margin: 40px auto;
  padding-inline: 22px
}

.portal-frame .page-head {
  margin-bottom: 28px
}

.portal-frame .portal-section {
  padding: 15px 0 20px;
  border-block-start: 1px solid var(--line)
}

.portal-section>h2 {
  font-size: 20px;
  margin-bottom: 8px
}

.portal-frame details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-top: 11px
}

.portal-frame summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  cursor: pointer;
  padding: 14px 16px;
  list-style: none;
  color: var(--ink);
  font-weight: 600
}

.portal-frame summary::-webkit-details-marker {
  display: none
}

.portal-frame details[open] summary .icon:last-child {
  transform: rotate(180deg)
}

.portal-frame details p {
  padding: 0 16px 15px;
  color: var(--muted);
  font-size: 15px
}

.portal-frame .sub {
  font-size: 15px;
  color: var(--muted)
}

.portal-top .mast-inner {
  justify-content: space-between
}

@media(max-width:1050px) {
  .frame,.mast-inner {
    width: calc(100% - 44px)
  }
  .mast-inner {
    gap: 12px
  }
  .top-nav {
    margin-inline: 5px auto
  }
  .top-nav a {
    padding-inline: 9px
  }
  .dashboard-grid {
    grid-template-columns: minmax(0,1fr) minmax(245px,30%);
    gap: 20px
  }
  .feature {
    padding: 19px;
    gap: 12px
  }
  .feature-time {
    padding-inline-start: 12px;
    min-width: 97px
  }
  .feature h2 {
    font-size: 21px
  }
  .file-list-head,.file-row {
    grid-template-columns: minmax(0,1.7fr) minmax(75px,.7fr) minmax(78px,.7fr) 12px;
    gap: 7px
  }
  .owner-cell .avatar-chip {
    display: none
  }
  .month-box {
    padding-inline: 14px
  }
  .file-grid .event-row {
    grid-template-columns: auto minmax(0,1fr) auto
  }
  .file-grid .row-actions {
    grid-column: 2/-1
  }
}

@media(max-width:760px) {
  .frame,.mast-inner {
    width: calc(100% - 32px)
  }
  .mast-inner {
    min-height: 58px;
    gap: 8px
  }
  .brand {
    gap: 8px
  }
  .brand img {
    width: 34px;
    height: 37px
  }
  .brand strong {
    font-size: 17px
  }
  .brand small {
    font-size: 10px;
    margin-top: 2px
  }
  .top-nav {
    display: none
  }
  .mast-tools {
    gap: 8px
  }
  .tool-search {
    width: 36px;
    justify-content: center
  }
  .tool-search span {
    display: none
  }
  .demo-label {
    font-size: 10px;
    padding-inline-start: 8px;
    gap: 4px
  }
  .demo-label i {
    height: 5px;
    width: 5px
  }
  .page-head {
    margin-block: 18px 15px;
    align-items: flex-start;
    gap: 8px
  }
  .page-head h1 {
    font-size: 27px
  }
  .page-head .sub {
    font-size: 12px;
    margin-top: 4px
  }
  .date-divider {
    padding-inline: 4px
  }
  .primary,.secondary {
    font-size: 14px;
    min-height: 42px;
    padding: 8px 12px;
    gap: 6px
  }
  .head-actions {
    gap: 5px
  }
  .head-actions:has(>button:nth-child(2)) {
    align-self: flex-start
  }
  .page-head:has(.head-actions>button:nth-child(2)) {
    flex-wrap: wrap
  }
  .page-head:has(.head-actions>button:nth-child(2)) .head-actions {
    width: 100%
  }
  .dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 18px
  }
  .main-col,.side-col {
    width: 100%
  }
  .side-col {
    gap: 17px
  }
  .dashboard-grid:not(.file-grid) .side-col:has(.month-box) {
    display: grid;
    grid-template-columns: 1fr
  }
  .dashboard-grid .month-box {
    max-width: 480px
  }
  .main-col:has(.feature)~.side-col .month-box {
    display: none
  }
  .section-block {
    margin-top: 19px
  }
  .section-heading {
    margin-bottom: 6px
  }
  .section-heading h2,.calendar-heading h2 {
    font-size: 19px
  }
  .text-link {
    font-size: 13px
  }
  .feature {
    border-radius: 11px;
    min-height: 145px;
    padding: 15px 16px;
    gap: 9px
  }
  .feature-kicker {
    font-size: 12px;
    gap: 5px
  }
  .feature-ref {
    font-size: 10px;
    padding-inline-start: 8px
  }
  .feature h2 {
    font-size: 19px;
    line-height: 1.45;
    margin: 6px 0
  }
  .feature-meta {
    gap: 3px 10px;
    font-size: 11px
  }
  .feature-meta .icon {
    width: 13px;
    height: 13px
  }
  .feature-time {
    min-width: 79px;
    padding-inline-start: 9px
  }
  .feature-time b {
    font-size: 30px
  }
  .feature-time span,.feature-time small {
    font-size: 10px
  }
  .feature-link {
    font-size: 13px;
    min-height: 32px;
    margin-top: 4px
  }
  .feature:after {
    width: 180px;
    left: 0
  }
  .event-row {
    gap: 8px;
    padding: 10px;
    min-height: 65px
  }
  .row-kind {
    width: 32px;
    height: 32px
  }
  .row-kind .icon {
    width: 16px
  }
  .row-content strong,.row-title {
    font-size: 14px
  }
  .row-meta {
    font-size: 11px
  }
  .row-when {
    font-size: 12px
  }
  .open-chevron {
    width: 20px
  }
  .file-row,.file-list-head {
    grid-template-columns: minmax(0,1.4fr) minmax(59px,.58fr) minmax(64px,.67fr) 10px;
    gap: 5px;
    padding: 8px 5px
  }
  .file-row strong {
    font-size: 13px
  }
  .file-row .muted {
    font-size: 11px
  }
  .file-list-head {
    font-size: 11px
  }
  .owner-cell,.next-cell small {
    font-size: 11px
  }
  .file-code {
    font-size: 11px
  }
  .badge {
    font-size: 10px;
    padding: 2px 5px
  }
  .file-arrow {
    width: 11px
  }
  .attention-row {
    padding-block: 10px
  }
  #mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    background: #fffffff5;
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
    bottom: 0;
    inset-inline: 0;
    padding: 4px 8px calc(4px + env(safe-area-inset-bottom));
    z-index: 5
  }
  #mobile-nav a {
    flex-direction: column;
    gap: 1px;
    min-height: 46px;
    font-size: 11px
  }
  #mobile-nav a[aria-current] {
    color: var(--teal)
  }
  #mobile-nav .icon {
    width: 20px;
    height: 20px
  }
  #foot {
    font-size: 11px;
    margin-top: 17px;
    padding: 12px 0 84px;
    gap: 8px;
    flex-wrap: wrap
  }
  #foot>div {
    gap: 9px
  }
  #foot .icon {
    width: 14px
  }
  .file-grid .section-block {
    margin-top: 15px
  }
  .file-grid .event-row {
    grid-template-columns: auto minmax(0,1fr) auto
  }
  .row-actions .small-button,.dialog-foot button {
    min-height: 42px
  }
  .file-grid .row-actions {
    grid-column: 2/-1
  }
  .case-next {
    padding: 12px 14px
  }
  .case-next h3 {
    font-size: 20px
  }
  .prep {
    font-size: 12px
  }
  .list-tools {
    gap: 7px
  }
  .list-tools select {
    font-size: 14px;
    padding-inline: 5px
  }
  .search-box input {
    font-size: 14px
  }
  .team-row {
    flex-wrap: wrap;
    gap: 7px
  }
  .team-row>div {
    font-size: 11px
  }
  .editor-dialog {
    inset: auto 0 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    max-height: 93dvh;
    border-radius: 15px 15px 0 0;
    border-bottom: 0
  }
  .editor-form {
    max-height: 92dvh
  }
  .dialog-head,.dialog-foot {
    padding: 12px 16px
  }
  .dialog-foot {
    padding-bottom: calc(12px + env(safe-area-inset-bottom))
  }
  .dialog-head h2 {
    font-size: 20px
  }
  .dialog-body {
    padding: 14px 16px;
    scrollbar-gutter: auto
  }
  .fields {
    gap: 9px
  }
  .field input,.field textarea,.field select,.search-box input {
    font-size: 16px
  }
  .kind-choice {
    font-size: 12px
  }
  .editor-dialog:modal {
    animation: sheetIn .16s ease-out
  }
  .search-dialog .dialog-body {
    max-height: 78dvh
  }
  #notice {
    bottom: calc(69px + env(safe-area-inset-bottom))
  }
  .portal-frame {
    padding: 0 16px;
    margin: 24px auto
  }
  .portal-top .demo-label {
    border: 0
  }
  .file-grid .case-facts {
    padding: 14px
  }
  .day-nav {
    margin-bottom: 7px
  }
}

@media(max-width:370px) {
  .frame,.mast-inner {
    width: calc(100% - 20px)
  }
  .feature-time {
    min-width: 64px
  }
  .feature-time b {
    font-size: 25px
  }
  .demo-label {
    font-size: 9px
  }
  .brand small {
    font-size: 9px
  }
  .event-row {
    gap: 5px
  }
  .dialog-body {
    padding: 12px
  }
  .field>span {
    font-size: 13px
  }
}

@keyframes sheetIn {
  from {
    transform: translateY(12px);
    opacity: .9
  }
  to {
    transform: translateY(0);
    opacity: 1
  }
}

@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation: none!important;
    transition: none!important;
    scroll-behavior: auto!important
  }
}

.row-meta .recorded {
  color: var(--teal);
  font-weight: 600;
}

.recorded .icon {
  width: 14px;
  height: 14px;
  margin-inline-end: 4px;
}

.page-head h1, .row-title, .file-row strong, .history-item p, .case-facts dd,
.attention-row strong, .feature-copy h2, .case-next h3, .prep {
  overflow-wrap: anywhere;
}

