/* App layout and content. Shared colors, type, and controls: /shared/theme.css. */
* {
  box-sizing: border-box;
}
[hidden] {
  display: none!important;
}
body {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,input,textarea {
  font: inherit;
}
button {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--control-bg);
  border-radius: 999px;
  padding: 9px 15px;
  cursor: pointer;
  transition: background .15s,border-color .15s;
}
button:hover {
  background: var(--control-hover);
  border-color: var(--line-strong);
}
button:disabled {
  opacity: .45;
  cursor: wait;
}
button.quiet {
  background: transparent;
  border-color: transparent;
  padding: 7px 10px;
}
button.danger {
  color: var(--error);
}
input,textarea {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  padding: 10px 12px;
  width: 100%;
}
label {
  display: block;
  font-weight: 600;
  font-size: 13px;
  margin: 18px 0 7px;
}
h1,h2,p {
  margin: 0;
}
h1 {
  font-size: 36px;
  letter-spacing: -0.04em;
  font-weight: 700;
  line-height: 1.2;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.3px;
}
p {
  margin: 10px 0 16px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 13px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 12px;
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.button-primary,.actions button {
  white-space: nowrap;
}
.app-header {
  min-height: 66px;
  padding: 12px max(24px, calc((100% - 1140px) / 2));
  background: var(--header-bg);
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 14px;
}
.header-spacer {
  flex: 1;
}
.account-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shell {
  width: min(1140px,calc(100% - 48px));
  margin: 76px auto 120px;
}
.sign-in {
  margin-top: 88px;
}
.sign-in h1 {
  font-size: 58px;
  letter-spacing: -0.04em;
}
.intro {
  color: var(--muted);
  font-size: 18px;
  margin: 24px 0 30px;
}
.google-button {
  padding: 14px 24px;
  display: flex;
  gap: 25px;
  align-items: center;
}
.google-button span {
  font-size: 19px;
  font-weight: 700;
}
.permission-note {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 20px;
}
.storage-explainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  border-top: 1px solid var(--line);
  margin-top: 55px;
  padding-top: 30px;
  max-width: 840px;
}
.storage-explainer code {
  overflow-wrap: anywhere;
}
.storage-explainer h2 {
  font-size: 14px;
}
.storage-explainer p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  margin-bottom: 40px;
}
.section-heading p {
  font-size: 13px;
}
.section-heading .eyebrow {
  font-size: 11px;
  letter-spacing: .6px;
}
.inline-form {
  padding: 26px 0 30px;
  border-top: 1px solid var(--line);
  margin-bottom: 20px;
  max-width: 700px;
}
.inline-form input {
  max-width: 460px;
}
.inline-form .actions {
  margin-top: 23px;
}
.destination {
  overflow-wrap: anywhere;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.filters {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 28px;
}
.filters button {
  border: none;
  border-radius: 0;
  background: none;
  padding: 13px 0;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.filters button[aria-pressed=true] {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.wiki-row {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  padding: 23px 0;
  border-bottom: 1px solid var(--line);
}
.wiki-row>div {
  min-width: 0;
}
.wiki-row span {
  display: block;
  font-size: 12px;
  margin-top: 3px;
}
.wiki-name {
  padding: 0;
  background: none;
  border: 0;
  text-align: left;
  font-weight: 600;
  font-size: 16px;
  overflow-wrap: anywhere;
}
.wiki-name:hover {
  background: none;
  color: var(--accent);
}
.empty {
  padding: 50px 0;
  color: var(--muted);
  font-size: 14px;
}
.app-footer {
  display: flex;
  gap: 24px;
  width: min(1140px,calc(100% - 48px));
  margin: 30px auto;
  color: var(--muted);
  font-size: 11px;
}
.app-footer span {
  margin-right: auto;
}
#message {
  margin: 16px 38px;
  padding: 12px 15px;
  background: var(--bg-soft);
  border-left: 2px solid var(--accent);
  font-size: 13px;
}
#message.error,.dialog-message.error {
  color: var(--error);
}
.workspace {
  margin: 38px auto;
  width: calc(100% - 76px);
}
.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 28px;
}
.workspace h1 {
  font-size: 28px;
  overflow-wrap: anywhere;
}
.workspace .eyebrow {
  margin-bottom: 6px;
}
.sync-status {
  font-size: 12px;
  color: var(--muted);
  margin-right: 12px;
}
.file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  gap: 18px;
}
.file-toolbar code,.file-toolbar strong {
  overflow-wrap: anywhere;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 13px 10px;
}
.file-name {
  background: none;
  border: 0;
  text-align: left;
  flex: 1;
  overflow-wrap: anywhere;
}
.file-detail {
  font-size: 12px;
}
.editor-layout {
  display: flex;
  min-height: 60vh;
}
.editor-document {
  flex: 1;
  min-width: 0;
}
#sidebar {
  width: 220px;
  flex-shrink: 0;
  padding: 28px 24px 28px 0;
  border-right: 1px solid var(--line);
}
.page-link {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  margin: 3px 0;
  padding: 8px;
  font-size: 13px;
}
.markdown-body {
  max-width: 900px;
  padding: 36px 50px;
  overflow-wrap: anywhere;
}
.markdown-body h1 {
  font-size: 31px;
  margin: 22px 0;
}
.markdown-body h2 {
  margin: 28px 0 12px;
}
.markdown-body h3 {
  margin: 24px 0 10px;
}
.markdown-body a {
  color: var(--accent);
  text-decoration: underline;
}
.markdown-body pre {
  overflow: auto;
  padding: 20px;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: 13px;
}
.markdown-body code {
  background: var(--bg-soft);
  font-size: .9em;
}
.markdown-body img {
  max-width: 100%;
}
.markdown-body table {
  display: block;
  overflow: auto;
  border-collapse: collapse;
}
.markdown-body td,.markdown-body th {
  padding: 8px 14px;
  border: 1px solid var(--line);
}
.markdown-body blockquote {
  margin-left: 0;
  border-left: 3px solid var(--line);
  padding-left: 20px;
  color: var(--muted);
}
#markdownInput {
  display: block;
  resize: vertical;
  min-height: 65vh;
  border: 0;
  border-radius: 0;
  padding: 32px;
  font-family: var(--font-code);
  font-size: 14px;
  line-height: 1.7;
  background: transparent;
}
.agent-info {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 24px;
}
.agent-info code,dialog code {
  display: block;
  overflow-wrap: anywhere;
  font-size: 11px;
}
.agent-info summary {
  cursor: pointer;
}
dialog {
  max-width: 580px;
  width: calc(100% - 32px);
  padding: 30px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #0009;
}
dialog p {
  font-size: 13px;
}
dialog .actions {
  margin-top: 24px;
}
dialog input {
  min-width: 0;
}
dialog .actions input {
  flex: 1;
}
dialog h2 {
  margin-bottom: 18px;
}
#shareResult {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 5px;
}
.choice-options {
  min-width: 0;
  margin: 20px 0;
  padding: 0;
  border: 0;
}
.choice-options legend {
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}
.choice-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.choice-option input {
  width: auto;
  margin: 4px 0 0;
  accent-color: var(--accent-strong);
}
.choice-option strong, .choice-option small {
  display: block;
}
.choice-option strong {
  font-size: 14px;
}
.choice-option small {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.sharing-details {
  font-size: 12px;
  color: var(--muted);
}
.sharing-details summary {
  cursor: pointer;
}
.mobile-only {
  display: none;
}
@media(max-width:760px) {
  .app-header {
    height: auto;
    min-height: 64px;
    padding: 12px 20px;
    gap: 12px;
    flex-wrap: wrap;
  }
  #headerSignIn {
    padding: 7px 2px;
    font-size: 13px;
  }
  .account-controls {
    order: 1;
    flex-basis: 100%;
    justify-content: flex-end;
    font-size: 11px;
    gap: 12px;
  }
  .account-controls>span {
    display: none;
  }
  .account-controls button {
    font-size: 11px;
    padding: 6px;
  }
  .shell {
    width: calc(100% - 40px);
    margin: 48px auto 80px;
  }
  .sign-in h1 {
    font-size: 45px;
  }
  .sign-in .intro {
    font-size: 16px;
  }
  .storage-explainer {
    gap: 25px;
    margin-top: 40px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 22px;
  }
  .section-heading h1 {
    font-size: 30px;
  }
  .destination {
    align-items: flex-start;
    flex-direction: column;
  }
  .workspace {
    width: calc(100% - 32px);
    margin-top: 25px;
  }
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .file-toolbar {
    flex-wrap: wrap;
  }
  .file-toolbar button {
    font-size: 12px;
    padding: 8px;
  }
  .workspace .actions {
    gap: 6px;
  }
  .file-row {
    gap: 8px;
    padding: 12px 0;
  }
  .file-row button {
    padding: 7px;
  }
  .file-detail {
    display: none;
  }
  .editor-layout {
    position: relative;
  }
  #sidebar {
    display: none;
    width: 230px;
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    background: var(--bg);
    padding: 20px;
    border: 1px solid var(--line);
  }
  #sidebar.open {
    display: block;
  }
  .mobile-only {
    display: block;
  }
  .markdown-body {
    padding: 20px 6px;
  }
  .markdown-body h1 {
    font-size: 28px;
  }
  #markdownInput {
    padding: 20px 4px;
    font-size: 13px;
  }
  .app-footer {
    width: calc(100% - 40px);
    margin: 26px auto;
    gap: 16px;
  }
  #message {
    margin: 14px 16px;
  }
  .permission-note br {
    display: none;
  }
  dialog {
    padding: 22px;
  }
  .wiki-row span {
    font-size: 11px;
  }
  .filters {
    gap: 24px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    transition: none!important;
    scroll-behavior: auto!important;
  }
}
