:root {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  color: #1b2537;
  background: #f1f3f9;
  color-scheme: light;
  --accent: #35259d;
  --muted: #505d74;
  --line: #d5dbe9;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { width: min(1050px, 100%); margin: 0 auto; padding: clamp(24px, 6vw, 78px) 24px; }
h1 { font-size: clamp(2.3rem, 7vw, 4rem); letter-spacing: -.055em; margin: 0 0 28px; }
h2 { font-size: 1.55rem; margin: 0 0 12px; }
p { color: var(--muted); line-height: 1.6; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid #533df2; outline-offset: 4px; }
.launcher { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px; align-items: stretch; }
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.services a, .panel { background: white; border: 1px solid var(--line); border-radius: 16px; }
.services a {
  min-height: 104px; padding: 16px; color: #1b2537; text-decoration: none;
  font-size: 1.24rem; font-weight: 650; display: flex; justify-content: space-between;
  align-items: center; gap: 8px;
}
.services a:hover { border-color: var(--accent); background: #f9f8ff; }
.services span { color: var(--accent); font-size: 1rem; }
.panel { padding: 24px; }
.help { background: #eeebff; border-color: #dcd4fa; }
.help p { margin: 0 0 20px; max-width: 31ch; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 18px; border: 1px solid var(--accent); border-radius: 10px;
  font: inherit; font-weight: 650; background: var(--accent); color: white; text-decoration: none;
  cursor: pointer;
}
.button:hover { background: #271987; }
.button:disabled { opacity: .65; cursor: wait; }
.plain { font: inherit; color: var(--accent); background: transparent; border: 0; padding: 6px; cursor: pointer; text-decoration: underline; }
.conversation { max-width: 690px; margin: auto; }
.conversation header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.conversation h1 { margin-bottom: 6px; }
form { display: grid; gap: 12px; }
form label { display: grid; gap: 6px; font-weight: 650; }
input, select, textarea {
  min-width: 0; width: 100%; border: 1px solid #aab5cd; border-radius: 8px;
  background: white; color: inherit; font: inherit; padding: 10px;
}
textarea { resize: vertical; }
form .button { justify-self: start; }
#messages { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
#messages li { background: #f1f3f9; padding: 12px 16px; border-radius: 12px; overflow-wrap: anywhere; }
#messages li[data-owner="mother"] { background: #eeebff; }
#messages p { margin: 6px 0 0; color: inherit; white-space: pre-wrap; }
#messages time { margin-left: 10px; color: var(--muted); font-size: .85rem; }
#compose { margin-top: 20px; }
#status { min-height: 1.6rem; }
#web-access { margin-top: 18px; }
#web-access summary { font-weight: 650; cursor: pointer; }
#web-access .hint { margin: 0; font-size: .875rem; }
#grants { list-style: none; margin: 12px 0 0; padding: 0; }
#grants li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 8px 0; overflow-wrap: anywhere; }
@media (max-width: 620px) {
  .launcher { grid-template-columns: 1fr; }
  .services a { min-height: 70px; }
  .panel { padding: 16px; }
}
