@font-face {
  font-family: Studio;
  src: local("Open Sans"), local("Segoe UI")
}

* {
  box-sizing: border-box
}

html {
  --bg: #f8f6f1;
  --panel: #fffdf9;
  --line: #d9dcd2;
  --ink: #1d3731;
  --muted: #52665e;
  --teal: #164d46;
  --warm: #99452e;
  --pale: #e4ece3;
  --sand: #f3e8d6;
  --rose: #f4e3db;
  color-scheme: light
}

html[data-theme=dark] {
  --bg: #142521;
  --panel: #1b302a;
  --line: #40564f;
  --ink: #f6f3e8;
  --muted: #c0cec3;
  --teal: #97d2c2;
  --warm: #edaa8d;
  --pale: #2d4940;
  --sand: #4a4234;
  --rose: #4c3831;
  color-scheme: dark
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 16px/1.53 Studio, "Segoe UI", Arial, sans-serif
}

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

button,
a,
input,
select,
textarea {
  touch-action: manipulation
}

button,
a {
  cursor: pointer
}

button {
  border: 0;
  background: none
}

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

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

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

#shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr)
}

aside {
  border-right: 1px solid var(--line);
  background: var(--panel);
  padding: 36px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 23px/1.12 Georgia, serif;
  letter-spacing: -.7px
}

.brand small,
.sidebar-foot small {
  display: block;
  color: var(--muted);
  font: 12.5px/1.7 Studio, Arial, sans-serif;
  letter-spacing: .2px
}

.logo {
  border-radius: 14px;
  background: #1a544b;
  color: #f6d5aa;
  height: 43px;
  width: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font: 700 17px Georgia;
  flex: none
}

.logo i {
  width: 3px;
  height: 20px;
  display: inline-block;
  background: currentColor;
  border-radius: 4px
}

nav {
  margin-top: 54px;
  display: grid;
  gap: 6px
}

nav a {
  min-height: 47px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 10px;
  padding: 10px 15px;
  color: var(--muted);
  font-weight: 600
}

nav a[aria-current=page] {
  background: var(--pale);
  color: var(--teal)
}

.ico {
  width: 21px;
  height: 21px;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 13px;
  border-top: 1px solid var(--line);
  padding: 22px 4px 0
}

.monogram {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--sand);
  font-weight: 700;
  color: var(--warm)
}

main {
  width: 100%;
  max-width: 1510px;
  margin: 0 auto;
  padding: 36px clamp(22px, 3.8vw, 66px) 65px;
  min-width: 0
}

.topline,
.between,
.actions,
.meta {
  display: flex;
  align-items: center;
  gap: 12px
}

.between,
.topline {
  justify-content: space-between
}

.topline {
  color: var(--muted);
  font-size: .87rem;
  font-weight: 600;
  margin-bottom: 28px
}

.topline .trail {
  display: flex;
  gap: 9px;
  align-items: center
}

.iconbtn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel)
}

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

h1,
h2,
.hero h2,
.large-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.04em
}

h1 {
  font-size: clamp(2.5rem, 4.1vw, 4.5rem);
  line-height: 1.08
}

.lead {
  color: var(--muted);
  margin: 8px 0 25px;
  font-size: 1.03rem
}

h2 {
  font-size: clamp(1.7rem, 2.4vw, 2.6rem);
  line-height: 1.15
}

h3 {
  font-size: 1.08rem;
  line-height: 1.3
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 23px;
  background: #17443d;
  color: white;
  min-height: 305px;
  display: flex;
  align-items: center
}

.hero>img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 61%;
  z-index: -2
}

.hero:after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(13, 48, 42, .94), rgba(17, 49, 42, .80) 34%, rgba(0, 20, 19, .05) 85%)
}

.hero-copy {
  padding: 34px clamp(24px, 3vw, 48px);
  max-width: 570px
}

.eyebrow {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: .73rem;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase
}

.hero .eyebrow {
  color: #f3dcab
}

.hero h2 {
  color: #fff;
  font-size: clamp(2.55rem, 4.1vw, 4.7rem);
  line-height: 1.04;
  margin: 14px 0 10px
}

.hero p {
  color: #fff;
  max-width: 370px
}

.hero .actions {
  margin-top: 22px;
  gap: 16px
}

.primary,
.secondary,
.light,
.danger,
.chip,
.textbtn {
  min-height: 44px;
  padding: 10px 17px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 650
}

.primary {
  background: #1b5549;
  color: #fff
}

.light {
  background: #fffaf0;
  color: #204b40
}

.danger {
  background: #98472f;
  color: white
}

.secondary,
.chip {
  background: var(--panel);
  border: 1px solid var(--line)
}

.textbtn {
  color: var(--teal);
  padding-inline: 6px
}

.chip.active {
  background: var(--pale);
  border-color: var(--teal)
}

button:hover:not(:disabled),
a.tile:hover {
  filter: brightness(.96)
}

.section {
  margin-top: 32px
}

.section>.between {
  margin-bottom: 15px
}

.grid,
.cards,
.tutors,
.stats {
  display: grid;
  gap: 16px
}

.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.tile,
.panel,
.tutor,
.stat {
  border-radius: 17px;
  border: 1px solid var(--line);
  background: var(--panel)
}

.tile {
  padding: 19px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 155px;
  gap: 8px
}

.tile-top {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  margin-bottom: 5px
}

.blockicon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--teal);
  background: var(--pale)
}

.tone1 {
  color: var(--warm);
  background: var(--rose)
}

.tone2 {
  color: var(--muted);
  background: var(--sand)
}

.muted,
.tile p,
.panel .detail {
  color: var(--muted)
}

.tile p {
  font-size: .93rem
}

.panel,
.stat {
  padding: 22px
}

.today-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px
}

.tutor-mini {
  display: flex;
  align-items: center;
  gap: 16px
}

.tutor-mini img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover
}

.panel h3 {
  margin: 0 0 5px
}

.tutors {
  grid-template-columns: repeat(2, minmax(0, 1fr))
}

.tutor {
  overflow: hidden
}

.tutor>img {
  width: 100%;
  aspect-ratio: 2/1;
  object-fit: cover;
  object-position: center 36%;
  display: block
}

.tutor>div {
  padding: 20px
}

.actions {
  flex-wrap: wrap
}

.detail,
.small,
small {
  font-size: .87rem
}

.panel p+p {
  margin-top: 7px
}

.hero .small {
  color: white
}

.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr))
}

.stat strong {
  font: normal 2.15rem Georgia;
  display: block;
  margin-bottom: 4px
}

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

.fields label,
.stack {
  display: grid;
  gap: 7px
}

.stack {
  margin: 12px 0
}

.field,
select,
input:not([type=checkbox]),
textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  min-height: 45px
}

input[type=checkbox] {
  width: 21px;
  height: 21px;
  accent-color: var(--teal);
  vertical-align: middle
}

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

.row:last-child {
  border-bottom: 0
}

.row>div {
  min-width: 0;
  overflow-wrap: anywhere
}

.dialog-title {
  font-size: 2rem;
  margin-bottom: 13px
}

dialog {
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 21px;
  background: var(--panel);
  padding: 25px;
  width: min(520px, 93vw);
  max-height: 88dvh
}

dialog::backdrop {
  background: #112d2688
}

#dialog-close {
  margin-top: 15px
}

.skip {
  position: fixed;
  left: -200vw;
  z-index: 10
}

.skip:focus {
  left: 10px;
  top: 5px;
  background: white;
  color: black;
  padding: 10px
}

#toast {
  position: fixed;
  z-index: 12;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #163e36;
  color: white;
  max-width: min(90vw, 600px);
  display: none
}

#toast.show {
  display: block
}

.call-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(225px, .8fr);
  gap: 18px
}

.stage {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: 20px;
  background: #17423a;
  color: white;
  display: flex;
  align-items: flex-end
}

.stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 29%
}

.stage .overlay {
  position: relative;
  background: linear-gradient(transparent, #112b28e8);
  padding: 60px 23px 20px;
  width: 100%
}

.stage h2 {
  font-size: 2.55rem
}

.state {
  display: flex;
  align-items: center;
  gap: 10px
}

.meter {
  height: 13px;
  width: 55px;
  display: inline-flex;
  gap: 3px;
  align-items: center
}

.meter i {
  width: 4px;
  background: #cbe1be;
  height: 33%;
  border-radius: 3px
}

.meter i:nth-child(2n) {
  height: 70%
}

.meter i:nth-child(3n) {
  height: 100%
}

.listening .meter i {
  transform: scaleY(var(--energy, .25));
  transform-origin: center
}

.controls {
  margin-top: 15px
}

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

.help-grid button {
  text-align: left;
  font-size: .88rem
}

.caption {
  min-height: 44px;
  margin-top: 8px;
  white-space: pre-line
}

.voice-only .stage img {
  display: none
}

.voice-only .stage {
  min-height: 170px
}

.notice {
  background: var(--sand);
  border-radius: 12px;
  padding: 12px 15px
}

.login {
  max-width: 460px;
  margin: 13vh auto
}

.stacked {
  display: grid;
  gap: 13px
}

.spaced {
  margin-top: 16px
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 30px;
  background: var(--pale);
  color: var(--teal);
  font-size: .8rem;
  font-weight: 650
}

.desktop-only {
  display: initial
}

progress {
  width: 100%;
  accent-color: #216250
}

.note-actions {
  flex-shrink: 0
}

.note-actions button {
  width: 44px;
  height: 44px
}

.panel details {
  margin-top: 8px
}

.panel summary {
  cursor: pointer;
  padding: 9px 0
}

.hero .actions select {
  width: auto;
  color: #fff;
  background: #244e42;
  border-color: #78998b
}

.week {
  display: flex;
  gap: 7px;
  margin: 8px 0
}

.week span {
  width: 24px;
  height: 6px;
  border-radius: 8px;
  background: var(--line)
}

.week .on {
  background: var(--teal)
}

.full {
  width: 100%
}

#call-status {
  min-height: 24px
}

.date {
  white-space: nowrap
}

body:has(.call-layout) .sidebar-foot {
  visibility: hidden
}

@media(min-width:1450px) {
  main {
    max-width: 1360px
  }

  .hero {
    min-height: 365px
  }
}

@media(max-width:1050px) {
  #shell {
    grid-template-columns: 198px minmax(0, 1fr)
  }

  aside {
    padding: 27px 13px
  }

  .brand {
    font-size: 20px;
    gap: 8px
  }

  main {
    padding: 23px 23px 65px
  }

  .cards {
    gap: 10px
  }

  .tile {
    padding: 15px
  }

  .call-layout {
    grid-template-columns: 1.1fr .9fr
  }

  .hero {
    min-height: 280px
  }
}

@media(max-width:760px) {
  #shell {
    display: block
  }

  aside {
    height: auto;
    position: static;
    padding: 13px 18px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line)
  }

  .brand {
    font-size: 20px
  }

  .logo {
    width: 37px;
    height: 37px
  }

  .brand small {
    font-size: 11px
  }

  .sidebar-foot {
    display: none
  }

  nav {
    position: fixed;
    z-index: 5;
    inset: auto 0 0;
    background: var(--panel);
    margin: 0;
    display: flex;
    justify-content: space-around;
    gap: 0;
    border-top: 1px solid var(--line);
    padding: 5px 3px max(5px, env(safe-area-inset-bottom))
  }

  nav a {
    padding: 4px 2px;
    min-height: 50px;
    min-width: 46px;
    font-size: 10px;
    gap: 2px;
    flex-direction: column;
    justify-content: center
  }

  main {
    padding: 17px 17px 90px
  }

  .topline {
    margin-bottom: 16px
  }

  .topline .iconbtn {
    height: 44px;
    width: 44px
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .cards.home {
    grid-template-columns: 1fr
  }

  .home .tile {
    min-height: 0;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0 13px
  }

  .home .tile-top {
    grid-row: span 2;
    margin: 0
  }

  .home .tile-top>.ico {
    display: none
  }

  .home .tile p {
    grid-column: 2
  }

  .today-bottom,
  .call-layout {
    grid-template-columns: 1fr
  }

  .stage {
    min-height: 300px
  }

  .tutors {
    gap: 10px
  }

  .tutor>div {
    padding: 14px
  }

  .tutor>img {
    aspect-ratio: 1.2
  }

  .hero {
    min-height: 280px;
    border-radius: 17px
  }

  .hero-copy {
    padding: 22px
  }

  .hero:after {
    background: linear-gradient(90deg, #103f37ec, #16483cb8 58%, #11291c24)
  }

  .hero .actions {
    gap: 9px
  }

  .section {
    margin-top: 24px
  }

  .fields,
  .stats {
    grid-template-columns: 1fr 1fr
  }

  .help-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .desktop-only {
    display: none
  }

  #toast {
    bottom: 76px
  }

  .between {
    gap: 6px
  }

  .tutor .actions {
    display: grid
  }

  .note-actions {
    display: flex
  }

  .date {
    font-size: .77rem
  }

  .lead {
    margin-bottom: 18px
  }

  .section>.between .textbtn {
    font-size: .85rem
  }

  .hero h2 {
    font-size: 2.65rem
  }
}

@media(max-width:420px) {

  .fields,
  .tutors {
    grid-template-columns: 1fr
  }

  .cards:not(.home) {
    grid-template-columns: 1fr
  }

  .panel {
    padding: 15px
  }

  .hero .actions select {
    max-width: 112px
  }

  .tutor>img {
    aspect-ratio: 2
  }

  .stats {
    gap: 8px
  }

  .stat {
    padding: 13px
  }

  .row {
    flex-wrap: wrap
  }

  .topline {
    gap: 6px
  }
}

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

#install-app[hidden] { display: none; }
@media (max-width: 760px) { #install-app { margin-left: auto; } }
