@font-face { font-family: 'IBM Plex Mono'; src: url('/plex-mono-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/plex-mono-semibold.woff2') format('woff2'); font-weight: 600 800; font-display: swap; }
:root {
  color-scheme: light;
  --ink: #22272c;
  --muted: #52606b;
  --line: #cbd3da;
  --page: #f3f6f8;
  --accent: #b23122;
  font: 100%/1.5 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color: var(--ink);
  background: var(--page);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; }
.masthead { position: relative; padding: 1rem clamp(1rem, 5vw, 3rem); }
.brand { width: clamp(190px, 28vw, 250px); height: clamp(100px, 15vw, 135px); margin-inline: auto; overflow: hidden; display: grid; align-content: center; }
.brand img { display: block; width: 100%; }
main { width: min(700px, calc(100% - 2rem)); margin: clamp(2rem, 11vh, 7rem) auto 4rem; }
h1 { margin: 0 0 1.5rem; font-size: clamp(1.7rem, 5.3vw, 3.3rem); letter-spacing: -.065em; line-height: 1.14; text-align: center; }
.composer { border: 1px solid var(--line); border-radius: 24px; background: white; padding: 1rem; box-shadow: 0 12px 34px #2028330e; }
.composer:focus-within { border-color: #8c9ca9; }
textarea, input, button { font: inherit; color: inherit; }
textarea { width: 100%; min-height: 106px; max-height: 50vh; padding: .35rem .35rem .7rem; resize: vertical; border: 0; background: transparent; }
textarea::placeholder { color: var(--muted); opacity: 1; }
.composer textarea:focus { outline: 0; }
.composer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
button { min-height: 42px; padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 14px; font-weight: 600; background: white; cursor: pointer; }
button:hover:not(:disabled) { border-color: #778792; background: #f4f7f9; }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button:disabled { cursor: default; opacity: .55; }
.icon-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--ink); }
.icon-button[aria-pressed='true'] { color: var(--accent); background: #fff2ef; border-color: var(--accent); }
.composer-tools .primary { margin-inline-start: auto; border-radius: 50%; background: var(--accent); border-color: var(--accent); color: white; }
.composer-tools .primary:disabled { opacity: .45; }
.composer-tools .primary:hover:not(:disabled) { background: #91281d; }
.icon { display: block; position: relative; width: 20px; height: 20px; }
.icon::before, .icon::after { content: ''; position: absolute; }
.paperclip::before { inset: 1px 5px 0 5px; border: 1.7px solid currentColor; border-top-color: transparent; border-radius: 7px; transform: rotate(38deg); }
.paperclip::after { width: 5px; height: 13px; top: 1px; left: 8px; border: 1.7px solid currentColor; border-bottom-color: transparent; border-radius: 6px; transform: rotate(38deg); }
.photo::before { inset: 5px 0 1px; border: 1.7px solid currentColor; border-radius: 3px; box-shadow: 0 -4px 0 -2px currentColor; }
.photo::after { width: 6px; height: 6px; top: 9px; left: 7px; border: 1.5px solid currentColor; border-radius: 50%; box-sizing: border-box; }
.video::before { inset: 4px 6px 4px 0; border: 1.7px solid currentColor; border-radius: 3px; }
.video::after { inset: 5px 0 5px 14px; border-radius: 2px; background: currentColor; clip-path: polygon(0 28%, 100% 0, 100% 100%, 0 72%); }
.mic::before { inset: 0 7px 7px; border: 1.6px solid currentColor; border-radius: 7px; }
.mic::after { inset: 5px 4px 2px; border: 1.6px solid currentColor; border-top: 0; border-radius: 0 0 8px 8px; }
.mic { background: linear-gradient(currentColor, currentColor) center bottom / 1.6px 3px no-repeat; }
.arrow::before { width: 1.8px; height: 14px; top: 3px; left: 9px; border-radius: 1px; background: currentColor; }
.arrow::after { width: 8px; height: 8px; top: 3px; left: 5.5px; border-top: 1.8px solid currentColor; border-left: 1.8px solid currentColor; transform: rotate(45deg); }
.message { margin: .7rem .25rem 0; color: var(--muted); font-size: .9rem; }
.message:empty { display: none; }
.attachments { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.attachments li { min-width: 0; display: flex; gap: .5rem; align-items: center; padding: .25rem; border: 1px solid var(--line); border-radius: 12px; }
.attachments img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.attachments span { max-width: min(180px, 36vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.attachments button { min-height: 36px; min-width: 36px; padding: 0 .35rem; border: 0; }
dialog { width: min(520px, calc(100% - 2rem)); max-height: 92dvh; padding: 1rem; border: 1px solid var(--line); border-radius: 20px; background: white; color: var(--ink); }
dialog::backdrop { background: #111c2980; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.dialog-heading h2 { margin: 0; font-size: 1.25rem; }
#viewfinder { display: block; width: 100%; max-height: 52dvh; border-radius: 12px; background: #171d24; }
dialog .composer-tools { margin-top: .75rem; }
.result { margin-top: 1rem; padding: 1rem 1.2rem; background: white; border: 1px solid var(--line); border-radius: 18px; }
.result h2 { margin: 0; font-size: 1.15rem; }
.result ul { padding-left: 1.2rem; margin: .5rem 0 0; }
.result li { margin: .2rem 0; }
.personal-actions { position: absolute; inset-block-start: 1.5rem; inset-inline-end: clamp(1rem, 5vw, 3rem); text-align: end; max-width: 260px; }
.google-login { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid #747775; border-radius: 14px; color: #1f1f1f; background: white; font: 500 .9rem/1.3 system-ui, sans-serif; text-decoration: none; }
.google-login:hover { background: #f7f8f9; }
.google-login:focus-visible, #balance:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.personal-actions { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: end; }
.login-page { width: min(430px, calc(100% - 2rem)); margin: clamp(2rem, 9vh, 6rem) auto; }
.login-card { display: grid; margin-top: 1.4rem; padding: clamp(1.15rem, 5vw, 1.9rem); border: 1px solid var(--line); border-radius: 24px; background: white; }
.login-card h1 { margin: 0 0 1.25rem; text-align: start; font-size: clamp(1.65rem, 5.3vw, 2.38rem); }
.login-card form { display: grid; gap: .5rem; }
.login-card label { font-size: .9rem; }
.login-card input { width: 100%; margin-bottom: .45rem; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); padding: .5rem .65rem; }
.login-card input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.login-card details { margin: 0 0 .4rem; font-size: .85rem; }
.login-card details label { display: block; margin-top: .4rem; }
.login-card summary { cursor: pointer; }
.login-submit { color: white; background: var(--accent); border-color: var(--accent); }
.login-submit:hover:not(:disabled), .stop-mic:hover:not(:disabled) { color: white; background: #91281d; border-color: #91281d; }
.login-switch { margin-top: .75rem; }
.login-card .google-login { justify-content: center; margin-top: .65rem; }
.dictation-progress { display: inline-flex; align-items: center; gap: .45rem; margin-inline-start: .25rem; color: var(--accent); }
.recording-dots { display: inline-flex; gap: 4px; }
.recording-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: recording-dot 1s infinite; }
.recording-dots i:nth-child(2) { animation-delay: .14s; }
.recording-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes recording-dot { 0%, 80%, 100% { opacity: .4; transform: scale(.7); } 40% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .recording-dots i { animation: none; } }
.stop-mic { margin-inline-start: auto; border-radius: 10px; border-color: var(--accent); background: var(--accent); color: white; }
.stop-mic span { display: block; width: 13px; height: 13px; border-radius: 2px; background: currentColor; }
#costs-dialog { width: min(620px, calc(100% - 2rem)); }
.cost-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin: .8rem 0; }
.cost-summary > div { min-width: 0; background: var(--page); border-radius: 12px; padding: .65rem .75rem; }
.query-billing > div { background: white; border: 1px solid var(--line); }
.cost-summary dt, #balance-form label { display: block; font-size: .85rem; }
.cost-summary dd { overflow-wrap: anywhere; margin: .3rem 0 0; font-size: 1.08rem; font-weight: 600; }
#balance-form { margin-block: 1rem; }
.balance-actions, .cost-footer { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: .35rem; }
#balance { min-width: 0; width: min(13rem, 100%); min-height: 42px; padding: .45rem .65rem; border: 1px solid var(--line); border-radius: 10px; }
#costs-content h3 { font-size: 1rem; margin: 0; }
#cost-calls { margin: .5rem 0 1rem; padding: 0; list-style: none; }
#cost-calls li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .2rem .6rem; border-bottom: 1px solid var(--line); padding: .5rem 0; font-size: .9rem; }
.cost-footer { justify-content: space-between; }
.cost-footer a { font-size: .88rem; color: var(--accent); }
[hidden] { display: none !important; }
@media (max-width: 720px) {
  .personal-actions { position: static; margin-inline: auto; justify-content: center; }
}
@media (max-width: 520px) {
  main { margin-top: 3rem; }
  .masthead { padding-top: .65rem; }
  .composer { padding: .8rem; }
}
