/* Additions to the mockup's style.css for states the mockup did not have. */
/* Loading screen: an outline of the workspace with a soft shimmer */
.boot { min-height: 100vh; display: grid; grid-template-columns: 224px minmax(0, 1fr); position: relative; }
.boot-rail { background: var(--forest); padding: 26px 16px 14px; display: flex; flex-direction: column; gap: 14px; }
.boot-brand { display: flex; align-items: center; gap: 11px; margin: 0 2px 30px 3px; }
.boot-rail .boot-bar { background: #2a4237; }
.boot-rail .boot-bar.faint { background: #213a2f; height: 38px; border-radius: 9px; }
.boot-rail .boot-bar.w40 { height: 10px; margin-bottom: 4px; }
.boot-main { padding: 0; }
.boot-top { height: 65px; padding: 0 36px; display: flex; justify-content: space-between; align-items: center; background: var(--paper); border-bottom: 1px solid var(--line); }
.boot-page { padding: 36px; display: grid; gap: 14px; max-width: 1180px; }
.boot-bar { display: block; height: 14px; border-radius: 7px; background: #e3e9e4; }
.boot-bar.title { height: 40px; width: min(260px, 50%); border-radius: 10px; }
.w15 { width: 15%; } .w20 { width: 20%; } .w40 { width: 40%; } .w45 { width: min(380px, 60%); } .w55 { width: 55%; } .w60 { width: 60%; } .w70 { width: 70%; } .w75 { width: 75%; } .w80 { width: 80%; }
.boot-block { display: block; height: 220px; border-radius: 20px; background: #ece8f3; margin-top: 8px; }
.boot-block.short { height: 150px; border-radius: 14px; background: #e8eee9; margin: 0; }
.boot-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.boot-note { position: absolute; top: 42%; left: calc(50% + 112px); transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; padding: 14px 22px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 34px #1a28211f; color: #2f4238; font-size: .95rem; font-weight: 500; }
.boot-row { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.boot-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #cfe0d3; border-top-color: #3d7a53; animation: boot-spin .8s linear infinite; }
.boot-slow { max-width: 300px; max-height: 0; overflow: hidden; opacity: 0; text-align: center; color: var(--soft); font-size: .84rem; font-weight: 400; animation: boot-reveal .4s ease 6s forwards; }
.boot-rail .boot-bar, .boot-top .boot-bar, .boot-page .boot-bar, .boot-block { animation: boot-pulse 1.6s ease-in-out infinite; }
@keyframes boot-spin { to { transform: rotate(360deg); } }
@keyframes boot-reveal { to { opacity: 1; max-height: 80px; margin-top: 8px; } }
@keyframes boot-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .boot-spinner { animation-duration: 2.4s; }
  .boot-rail .boot-bar, .boot-top .boot-bar, .boot-page .boot-bar, .boot-block { animation: none; }
}
@media (max-width: 850px) { .boot { grid-template-columns: 62px minmax(0, 1fr); } .boot-rail .boot-bar { display: none; } .boot-brand { margin: 0; } .boot-note { left: calc(50% + 31px); } }
@media (max-width: 650px) {
  .boot { display: block; }
  .boot-rail { flex-direction: row; padding: 8px 12px; }
  .boot-top { height: 48px; padding: 0 13px; }
  .boot-page { padding: 20px 13px; }
  .boot-cards { grid-template-columns: 1fr; }
  .boot-note { left: 50%; }
}
a.btn { text-decoration: none; }
a.btn, .btn { display: inline-flex; align-items: center; }
button.account { width: 100%; background: none; border-width: 1px 0 0; border-style: solid; border-color: #365043; color: inherit; text-align: left; }
button.top-avatar { border: 0; padding: 0; }

/* Sign-in and connect screens */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--forest); }
.gate-card { background: var(--paper); border-radius: var(--radius); padding: 32px; width: min(430px, 100%); display: grid; gap: 14px; justify-items: start; }
.gate-card h1 { font-size: 1.7rem; }
.gate-card p { color: var(--soft); font-size: .93rem; }
.gate-brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 750; font-size: .9rem; color: var(--green); }

.answer-key { border: 0; padding: 0; margin-inline: 0; }
.answer-key legend { margin-bottom: 6px; }
.answer-key .check-row { font-weight: 480; margin-bottom: 5px; }
.share-row { display: flex; gap: 8px; align-items: center; margin-top: 12px; width: 100%; }
.share-row input { flex: 1; min-width: 0; min-height: 34px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: .82rem; color: var(--soft); }
.scale-preview { display: flex; flex-wrap: wrap; gap: 12px; }
.empty .share-row { max-width: 520px; margin: 14px auto 0; }
.empty .btn + .btn { margin-left: 8px; }
.insights-result li { margin-bottom: 6px; }

/* The account button is at the bottom of the side bar. The top bar one is only for phones, where the side bar
   becomes a strip without it. It holds sign out and disconnect. */
button.top-avatar { display: none; }
@media (max-width: 650px) { button.top-avatar { display: grid; } }

/* Upgrade button in the top bar */
.top-upgrade {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, #7a52b3, #503479); color: #fff; font-size: .86rem; font-weight: 600; letter-spacing: .005em;
  box-shadow: 0 2px 10px #50347940, inset 0 1px 0 #ffffff33; transition: transform .15s, box-shadow .15s, filter .15s;
}
.top-upgrade .icon { --icon-size: 16px; }
.top-upgrade:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 5px 16px #50347955, inset 0 1px 0 #ffffff33; }
.top-upgrade:active { transform: none; }
.top-upgrade:focus-visible { outline: 3px solid #b79ad9; outline-offset: 2px; }
@media (max-width: 650px) { .top-upgrade { height: 32px; padding: 0 11px; font-size: .8rem; } }

/* Files and links for the AI draft */
.source-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 9px; }
.source-chip, .source-link { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #d7c5e8; border-radius: 8px; padding: 0 2px 0 9px; min-height: 34px; font-size: .8rem; color: #503479; max-width: 100%; }
.source-chip > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.source-chip .icon, .source-link .icon { --icon-size: 15px; }
.source-link { flex: 1 1 230px; }
.source-link input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: .82rem; }
.source-chip .icon-btn, .source-link .icon-btn { width: 30px; height: 30px; }
.source-row .source-note { flex-basis: 100%; font-size: .74rem; margin: 0; }

/* Chat editing panel */
#chat { position: fixed; z-index: 12; right: 16px; bottom: 16px; width: min(370px, calc(100vw - 32px)); height: min(580px, calc(100dvh - 100px)); display: flex; flex-direction: column; background: #fff; border: 1px solid #d2e1d4; border-radius: var(--radius); box-shadow: 0 18px 60px #0b281f33; overflow: hidden; }
#chat[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 15px; border-bottom: 1px solid var(--line); }
.chat-head h2 { font-size: 1rem; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 9px; font-size: .86rem; }
.chat-message { padding: 9px 11px; border-radius: 12px; background: #f2f6f2; max-width: 92%; overflow-wrap: anywhere; }
.chat-message p { white-space: pre-wrap; }
.chat-message.user { align-self: flex-end; background: #254e39; color: #fff; }
.chat-message ul { margin: 6px 0 0; padding-left: 17px; }
.chat-done { color: #296243; }
.chat-failed { color: #9b303c; }
.chat-confirm { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.chat-confirm p { flex-basis: 100%; font-weight: 660; }
.chat-working { color: var(--soft); font-style: italic; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 6px; border-top: 1px solid var(--line); }
.chat-compose textarea { flex: 1; min-width: 0; resize: none; border: 1px solid #d6e1d7; border-radius: 8px; padding: 8px 10px; font-size: .88rem; }
.chat-note { padding: 0 12px 9px; font-size: .72rem; color: var(--soft); }
body.chat-open #toast { right: auto; left: 17px; }
body.chat-open .page { padding-bottom: 620px; }
/* On wide screens the panel sits beside the form; question settings move under the questions. */
@media (min-width: 1100px) {
  body.chat-open .page { padding-bottom: 54px; padding-right: 402px; }
  body.chat-open .editor-layout { grid-template-columns: minmax(0, 1fr); }
  body.chat-open .editor-layout .inspector { position: static; }
  body.chat-open .editor-heading { flex-wrap: wrap; }
}
@media (max-width: 650px) {
  #chat { right: 0; bottom: 0; width: 100vw; height: 70dvh; border-radius: var(--radius) var(--radius) 0 0; }
  body.chat-open .page { padding-bottom: 72dvh; }
  body.chat-open #toast { top: 60px; bottom: auto; }
}

/* Plans, purchase screen and paywall */
#rail-plans[hidden] { display: none; }
.quota { margin: 16px 0 14px; font-size: .78rem; color: #503479; }
.quota[hidden] { display: none; }
.quota button, .link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; }
.plan-notice { background: #e4f1e4; color: #296243; border-radius: 10px; padding: 10px 13px; margin: 0 0 12px; font-weight: 600; font-size: .85rem; }
.plans-body { max-width: 1040px; }
.usage { color: var(--soft); font-size: .88rem; margin-bottom: 14px; }
.pro-tag { display: inline-block; background: #503479; color: #fff; border-radius: 5px; padding: 1px 5px; margin-left: 6px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; vertical-align: 1px; }
.prompt-counter { margin: 6px 0 0; font-size: .76rem; color: var(--soft); }
.prompt-counter.over { color: #9b303c; font-weight: 650; }
.prompt-counter[hidden] { display: none; }

/* Purchase screen */
dialog.paywall { width: min(720px, calc(100vw - 20px)); }
.interval { display: flex; justify-content: center; gap: 4px; background: #f2ecf9; border-radius: 10px; padding: 4px; width: max-content; max-width: 100%; margin: 0 auto 18px; }
.interval button { border: 0; background: transparent; border-radius: 7px; padding: 7px 14px; font-size: .84rem; font-weight: 700; color: #503479; }
.interval button[aria-pressed="true"] { background: #fff; box-shadow: 0 1px 4px #4d316030; }
.interval em { font-style: normal; font-size: .72rem; color: #296243; margin-left: 5px; }
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 16px; align-items: stretch; }
.offer { position: relative; display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px 22px; }
.offer.free { background: #f8faf8; }
.offer.best { border: 2px solid #503479; background: #fbf8ff; box-shadow: 0 10px 30px #50347922; }
.offer-badge { position: absolute; top: -11px; left: 20px; background: #503479; color: #fff; border-radius: 20px; padding: 3px 11px; font-size: .7rem; font-weight: 650; letter-spacing: .01em; }
.offer h3 { font-size: 1.15rem; font-weight: 640; }
.offer-price { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.offer-price strong { font-size: 2.5rem; font-weight: 650; letter-spacing: -.045em; line-height: 1; }
.offer-price span { color: var(--soft); font-size: .88rem; }
.offer-price .was { color: #7b8a82; font-size: 1.05rem; text-decoration: line-through; }
.offer-billing { color: var(--soft); font-size: .84rem; margin-bottom: 12px; }
.offer .save { font-style: normal; font-size: .72rem; font-weight: 600; background: #e0f0e1; color: #25603f; border-radius: 12px; padding: 2px 8px; margin-left: 4px; white-space: nowrap; }
.offer-buy { justify-content: center; width: 100%; min-height: 46px; font-size: .95rem; font-weight: 600; }
.btn.offer-buy.primary { background: #503479; }
.btn.offer-buy.primary:hover { background: #634391; }
.offer-reassure { text-align: center; color: var(--soft); font-size: .76rem; margin-top: 2px; }
.offer-state { text-align: center; font-weight: 600; font-size: .86rem; color: var(--soft); padding: 12px 0; background: #f3f0f7; border-radius: 9px; }
.offer-features { list-style: none; padding: 16px 0 0; margin: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: .92rem; line-height: 1.4; }
.offer-features li { display: flex; gap: 9px; align-items: flex-start; }
.offer-features li strong { font-weight: 640; }
.offer-features .icon { --icon-size: 16px; color: #3d7a53; margin-top: 2px; flex: 0 0 auto; }
.meter { height: 8px; border-radius: 8px; background: #e3e8e4; overflow: hidden; }
.meter span { display: block; height: 100%; background: #6f9c7e; border-radius: 8px; }
.offer-meter-text { color: var(--soft); font-size: .82rem; margin-top: 2px; }
.offer-note { margin-top: 14px; font-size: .82rem; }
.offer-trust-row { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 22px 0 0; font-size: .85rem; color: #3f5247; }
.offer-trust-row li { display: flex; align-items: center; gap: 7px; }
.offer-trust-row li::before { content: "✓"; color: #3d7a53; font-weight: 700; }
.offer-faq { margin-top: 36px; max-width: 760px; }
.offer-faq h2 { font-size: 1.2rem; font-weight: 640; margin-bottom: 10px; }
.offer-faq details { border-bottom: 1px solid var(--line); }
.offer-faq details:first-of-type { border-top: 1px solid var(--line); }
.offer-faq summary { cursor: pointer; font-weight: 560; font-size: .95rem; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.offer-faq summary::-webkit-details-marker { display: none; }
.offer-faq summary::after { content: "+"; color: #503479; font-size: 1.2rem; line-height: 1; }
.offer-faq details[open] summary::after { content: "−"; }
.offer-faq p { color: var(--soft); font-size: .9rem; line-height: 1.6; padding: 0 28px 14px 0; }
.offer-trust { margin-top: 14px; font-size: .76rem; color: var(--soft); }
.chat-head .pro-tag { vertical-align: 2px; }
.chat-lock { flex: 1; overflow-y: auto; padding: 22px 18px; display: flex; flex-direction: column; gap: 12px; font-size: .88rem; background: linear-gradient(#f8f4fc, #fff 55%); }
.chat-lock h3 { font-size: 1.2rem; font-weight: 640; line-height: 1.25; }
.chat-lock-text { color: var(--soft); line-height: 1.5; }
.chat-lock-examples { list-style: none; margin: 2px 0 4px; padding: 0; display: grid; gap: 7px; }
.chat-lock-examples li { background: #fff; border: 1px dashed #cdbbe0; border-radius: 10px; padding: 9px 12px; color: #6a5a7d; font-style: italic; }
.chat-lock .btn { justify-content: center; min-height: 46px; background: #503479; border-color: #503479; color: #fff; font-weight: 600; }
.chat-lock .btn:hover { background: #634391; }
.chat-lock-note { color: var(--soft); font-size: .78rem; text-align: center; }

/* choosing from Drive */
.drive-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.drive-row span { overflow-wrap: anywhere; }
.drive-file { display: flex; width: 100%; justify-content: flex-start; margin-bottom: 8px; }

/* Templates */
.template-filters { margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; width: max-content; max-width: 100%; }
.template-preview { background: #f6f8f6; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 4px 0 14px; }
.template-preview-head { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #5d7c66; margin-bottom: 6px; }
.template-preview ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: .9rem; max-height: 240px; overflow-y: auto; }
.template-note { background: #f3effa; color: #503479; border-radius: 9px; padding: 9px 12px; font-size: .86rem; margin-top: 4px; }

.dialog-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #e3e8e1; }
.dialog-links a { color: #52605a; font-size: .85rem; text-decoration: none; }
.dialog-links a:hover { color: inherit; text-decoration: underline; }
