:root {
  color-scheme: light;
  --ink: #213e37;
  --muted: #64736c;
  --paper: #faf9f5;
  --line: #e2e6df;
  --accent: #315a47;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    16px/1.6 system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
.button {
  cursor: pointer;
  border: 1px solid var(--accent);
  border-radius: 12px;
  background: var(--accent);
  color: white;
  padding: 12px 19px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 550;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.quiet {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}
button:hover,
.button:hover {
  filter: brightness(0.95);
}
:focus-visible {
  outline: 3px solid #a66a29;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
header {
  height: 92px;
  max-width: 1480px;
  padding: 0 4vw;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.mark {
  display: grid;
  place-items: center;
  background: #e6ecd9;
  border-radius: 50%;
  width: 39px;
  height: 39px;
  font:
    24px Georgia,
    serif;
  letter-spacing: -3px;
  padding-right: 4px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 50px;
  padding: 4px 10px;
  font-size: 11px;
  color: var(--muted);
}
main {
  max-width: 850px;
  margin: auto;
  padding: 0 28px;
  min-height: calc(100dvh - 190px);
}
.welcome {
  text-align: center;
  padding: 100px 0 60px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
}
h1 {
  font:
    400 clamp(44px, 6.5vw, 76px)/1.05 Georgia,
    serif;
  letter-spacing: -3px;
  margin: 26px 0;
}
p {
  color: var(--muted);
}
.welcome p {
  margin: 26px 0 36px;
}
.welcome .fine {
  font-size: 12px;
  margin-top: 20px;
}
.fine {
  font-size: 12px;
  color: var(--muted);
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 48px;
  gap: 18px;
}
.workspace-heading h1 {
  font-size: 37px;
  letter-spacing: -1px;
  margin: 12px 0;
}
#messages {
  padding: 32px 0 16px;
  min-height: 160px;
}
.message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 18px 22px;
  margin: 0 0 20px;
  border-radius: 18px;
  max-width: 92%;
}
.message.user {
  background: #e9eee6;
  margin-left: auto;
  max-width: 85%;
}
.message.assistant {
  padding-left: 0;
  color: var(--ink);
}
#chat-form {
  margin-top: 22px;
  border: 1px solid #d6dfd4;
  border-radius: 22px;
  box-shadow: 0 8px 30px #213e3707;
  padding: 18px;
  background: #fff;
}
textarea {
  width: 100%;
  min-height: 75px;
  max-height: 220px;
  resize: vertical;
  border: 0;
  background: transparent;
  outline: none;
  color: var(--ink);
  line-height: 1.6;
}
textarea:focus-visible {
  outline: 2px solid #799581;
  outline-offset: 5px;
  border-radius: 4px;
}
.composer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.privacy-note {
  text-align: center;
}
#draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#status {
  font-size: 14px;
  background: #f0e9db;
  border-radius: 10px;
  padding: 12px 18px;
}
#status:empty {
  display: none;
}
footer {
  max-width: 1480px;
  padding: 30px 4vw;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: 90dvh;
  box-shadow: 0 30px 100px #142b3230;
}
dialog::backdrop {
  background: #152c2444;
  backdrop-filter: blur(4px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
h2 {
  font:
    30px/1.2 Georgia,
    serif;
  margin: 0;
}
h3 {
  font:
    23px/1.25 Georgia,
    serif;
}
.card {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.card p {
  font-size: 14px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.full {
  width: 100%;
  margin: 10px 0;
}
.stack {
  display: grid;
  gap: 10px;
}
select,
input {
  max-width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  color: var(--ink);
}
label {
  display: block;
  margin: 15px 0 7px;
  font-size: 14px;
}
label.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
label.consent input {
  margin-top: 5px;
}
#preview {
  max-width: 1300px;
  height: 92dvh;
  padding: 18px;
}
#preview-frame {
  width: 100%;
  height: calc(100% - 70px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.skip {
  position: absolute;
  left: 10px;
  top: -100px;
}
.skip:focus {
  top: 10px;
  background: white;
  z-index: 10;
  padding: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 600px) {
  header {
    height: 76px;
    padding: 0 18px;
  }
  .brand {
    font-size: 11px;
    gap: 8px;
  }
  .top-actions {
    gap: 6px;
  }
  .pill {
    display: none;
  }
  .top-actions button {
    padding: 9px;
    font-size: 12px;
  }
  main {
    padding: 0 20px;
  }
  .welcome {
    padding-top: 75px;
  }
  .welcome h1 {
    letter-spacing: -2px;
  }
  .welcome p br {
    display: none;
  }
  .workspace-heading {
    padding-top: 30px;
  }
  .workspace-heading h1 {
    font-size: 29px;
  }
  .workspace-heading button {
    padding: 9px;
    font-size: 12px;
  }
  .composer-bottom .fine {
    font-size: 10px;
    max-width: 200px;
  }
  .message {
    padding: 14px;
  }
  footer {
    flex-direction: column;
    gap: 5px;
  }
  dialog {
    padding: 20px;
  }
  .dialog-top h2 {
    font-size: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.welcome-signin {
  margin: 20px 0;
}
.welcome-signin a {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  padding: 5px;
}

#preview[open] {
  display: flex;
  flex-direction: column;
}
#preview-frame {
  flex: 1;
  min-height: 0;
  height: auto;
}
.dialog-top {
  flex-shrink: 0;
}
#panel-status:not(:empty) {
  background: #f0e9db;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
}
.billing-options {
  display: inline-flex;
  gap: 4px;
  background: #f2f1eb;
  border-radius: 12px;
  padding: 4px;
  margin-top: 18px;
}
html:has(dialog[open]) {
  overflow: hidden;
}
.billing-options button[aria-pressed='true'] {
  background: var(--ink);
  color: white;
}

.photo-preview {
  display: block;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 8px;
  margin-block: 16px;
}
#panel-content input[type='file'] {
  max-width: 100%;
  padding: 14px 0;
}
#panel-content form > label {
  display: block;
  margin-top: 18px;
}
#photo-button {
  flex-shrink: 0;
}
#photo-button + span {
  flex: 1;
}
@media (max-width: 600px) {
  .composer-bottom {
    flex-wrap: wrap;
  }
  #photo-button + span {
    flex-basis: 70%;
  }
}

/* Owner overview keeps the first screen focused while details remain available. */
.owner-workspace main {
  max-width: 1160px;
}
.owner-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 14px;
  margin: 24px 0;
}
.owner-metric {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: white;
  color: var(--ink);
  text-decoration: none;
}
.owner-metric strong {
  display: block;
  font-size: 34px;
  line-height: 1.3;
  letter-spacing: -1px;
}
.owner-metric span {
  font-size: 13px;
  color: var(--muted);
}
.owner-detail > summary {
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  padding: 4px 0;
}
.owner-detail[open] > summary {
  margin-bottom: 20px;
}
.owner-workspace p {
  overflow-wrap: anywhere;
}
.owner-workspace meter {
  width: 100%;
  height: 18px;
  accent-color: var(--accent);
}
.owner-table-scroll {
  overflow-x: auto;
  max-width: 100%;
}
.owner-table-scroll table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.owner-table-scroll th,
.owner-table-scroll td {
  padding: 12px;
  text-align: start;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.owner-table-scroll caption {
  text-align: start;
  padding-block: 12px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .owner-workspace .workspace-heading {
    flex-wrap: wrap;
  }
  .owner-workspace .workspace-heading > div {
    flex-basis: 100%;
  }
}

.record-pages {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
