@charset "UTF-8";

/* Classic Macintosh window theme for Org's preamble, content, and postamble. */
@font-face {
  font-family: "LXGW WenKai";
  src: url("/css/LXGWWenKai-Regular.ttf") format("truetype");
  font-display: block;
}

:root {
  --desktop-blue: #6f74ae;
  --window-gray: #dddddd;
  --control-gray: #efefef;
  --paper: #fff;
  --ink: #262626;
  --muted: #666;
  --line: #262626;
  --shadow: #777;
  --highlight: #fff;
  --soft-line: #c7c7c7;
  --link: #000080;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background: var(--desktop-blue) url("/css/mac-finder-pattern-160.png") repeat;
  color: var(--ink);
  font-size: 15px;
}
body {
  min-height: 100vh;
  margin: 0;
  padding: 10px 0 24px;
  background: transparent;
  color: var(--ink);
  font-family: "LXGW WenKai", "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", serif;
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--link); }
a:visited { color: #551a8b; }
a:hover { color: #0000cc; }
a:focus-visible { outline: 1px dotted var(--ink); outline-offset: 3px; }

#preamble, #content, #postamble {
  width: min(calc(100% - 46px), 960px);
  margin-right: auto;
  margin-left: auto;
}

/* Org's three default regions make one continuous desktop window. */
#preamble {
  position: relative;
  z-index: 1;
  padding: 3px;
  border: 1px solid var(--line);
  background: var(--window-gray);
  box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 #999;
}

.mac-titlebar {
  display: flex;
  align-items: center;
  min-height: 24px;
  gap: 6px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  background: var(--window-gray);
  box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 #999;
}

.mac-title-control {
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 1px solid var(--line);
  background: var(--control-gray);
  box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 var(--shadow);
}
.mac-title-control-striped { background: repeating-linear-gradient(to bottom, var(--highlight) 0 1px, var(--shadow) 1px 2px); }
.mac-title-stripes {
  display: block;
  height: 16px;
  min-width: 12px;
  flex: 1 1 0;
  background: repeating-linear-gradient(to bottom, #f8f8f8 0 1px, #6f6f6f 1px 2px);
}
.mac-title {
  display: block;
  padding: 0 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.mac-title:visited, .mac-title:hover { color: var(--ink); text-decoration: none; }
.mac-title-controls { display: flex; align-items: center; gap: 5px; }
.mac-title-controls::before,
.mac-title-controls::after {
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 1px solid var(--line);
  background: var(--control-gray);
  box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 var(--shadow);
  content: "";
}
.mac-title-controls::before { outline: 1px solid var(--line); outline-offset: -4px; }

.mac-nav {
  display: flex;
  align-items: center;
  min-height: 39px;
  min-width: 0;
  gap: 20px;
  margin-top: 3px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  background: var(--window-gray);
  box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 #999;
}
.mac-nav a {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.mac-nav a:visited { color: var(--ink); }
.mac-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
#content {
  position: relative;
  min-height: calc(100vh - 140px);
  padding: 23px 23px 31px;
  border: 1px solid var(--line);
  border-top: 0;
  border-bottom: 0;
  background: var(--window-gray);
  box-shadow: inset 1px 0 0 var(--highlight), inset -1px 0 0 #999;
  overflow-wrap: break-word;
}

/* Match the bottom status bar: a beveled outer surround around a recessed paper well. */
#content::before {
  position: absolute;
  z-index: 0;
  inset: 3px;
  content: "";
  pointer-events: none;
  border: 1px solid #777;
  background: var(--paper);
  box-shadow: inset 1px 1px 0 #aaa, inset -1px -1px 0 var(--highlight);
}
#content > * { position: relative; z-index: 1; }

h1, h2, h3, h4, h5, h6 { color: var(--ink); font-family: inherit; font-weight: 700; line-height: 1.32; }
h1.title { margin: 0 0 28px; padding: 0 0 12px; border-bottom: 1px solid var(--soft-line); text-align: left; }
h1.title, h1, h2, h3 { font-size: 15px; }
h1 { margin: 32px 0 12px; }
h2 { margin: 27px 0 10px; }
h3 { margin: 23px 0 8px; }
h1.title::before, h1:not(.title)::before, h2::before { content: "# "; }
h4, h5, h6 { margin: 20px 0 7px; font-size: 16px; }
.outline-2, .outline-3, .outline-4, .outline-5, .outline-6 { margin-bottom: 22px; }
p { margin: 0 0 16px; }
ul, ol { margin: 8px 0 18px; padding-left: 30px; }
li { margin: 4px 0; }
ul { list-style: square; }

blockquote { margin: 18px 0; padding: 5px 0 5px 18px; border-left: 3px solid #777; color: #454545; }
blockquote p:last-child { margin-bottom: 0; }
code, kbd, samp { padding: 1px 4px; background: #f1f1f1; font-family: "Source Code Pro", ui-monospace, Menlo, Monaco, Consolas, monospace; font-size: .88em; }
pre, .example, .src, .org-src-container pre {
  margin: 16px 0 20px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f1f1f1;
  color: var(--ink);
  box-shadow: inset 1px 1px 0 #aaa, inset -1px -1px 0 var(--highlight);
  font-family: "Source Code Pro", ui-monospace, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
}
pre.src { position: relative; }
pre.src::before { top: 0; right: 0; padding: 2px 6px; border: 0; border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: var(--window-gray); color: var(--muted); font-size: 11px; }
pre code { padding: 0; background: transparent; }

table { width: auto; max-width: 100%; margin: 16px 0 20px; border-collapse: collapse; background: var(--paper); font-size: .9em; }
th, td { padding: 7px 10px; border: 1px solid #777; text-align: left; vertical-align: top; }
th { background: var(--window-gray); font-weight: 700; }
.figure, figure { margin: 18px 0; }
img { max-width: 100%; height: auto; border: 0; border-radius: 0; }
.figure p, .figure-number, .caption { color: var(--muted); font-size: .8em; }
.tag, .timestamp, .timestamp-wrapper, .org-info-js_info-navigation { color: var(--muted); font-size: .84em; }
.tag span { margin-left: 6px; }
.todo, .priority { color: #8b0000; font-weight: 700; }
.done { color: #444; font-weight: 700; }

#table-of-contents { margin: 0 0 24px; padding: 12px 15px; border: 1px solid var(--line); background: var(--control-gray); box-shadow: inset 1px 1px 0 #aaa, inset -1px -1px 0 var(--highlight); font-size: .9em; }
#table-of-contents h2 { margin: 0 0 7px; font-size: 1em; }
#table-of-contents ul { margin: 0; }
.footnotes { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--soft-line); color: #454545; font-size: .86em; }
.org-dl { margin: 14px 0; }
.org-dl dt { font-weight: 700; }
.org-dl dd { margin: 0 0 8px 20px; }
hr { margin: 24px 0; border: 0; border-top: 1px solid var(--soft-line); }

#postamble {
  padding: 3px;
  border: 1px solid var(--line);
  border-top: 0;
  background: var(--window-gray);
  box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 #999;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
  text-align: left;
}
.mac-statusbar { display: flex; align-items: center; min-height: 29px; gap: 8px; padding: 2px 4px; border: 1px solid #777; background: var(--window-gray); box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 #999; }
.mac-status-context, .mac-status-updated, .mac-status-credit {
  min-width: 0;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid #888;
  background: var(--control-gray);
  box-shadow: inset 1px 1px 0 #aaa, inset -1px -1px 0 var(--highlight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Keep the generator signature whole on desktop.  The poetic context yields first. */
.mac-status-context { flex: 0 1 350px; font-weight: 700; }
.mac-status-updated { flex: 0 1 170px; }
.mac-status-credit { flex: 0 1 373px; }
.mac-status-credit a { color: var(--ink); }
.mac-status-grip { width: 22px; height: 22px; flex: 0 0 22px; background: repeating-linear-gradient(135deg, transparent 0 5px, #777 5px 6px, transparent 6px 9px); }

@media (max-width: 767px) {
  body { padding: 5px 0 10px; font-size: 15px; }
  #preamble, #content, #postamble { width: 99%; }
  #preamble { padding: 2px; box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 #999; }
  #content { min-height: calc(100vh - 180px); padding: 25px 19px 31px; border-width: 0 1px; }
  #postamble { padding: 2px; box-shadow: inset 1px 1px 0 var(--highlight), inset -1px -1px 0 #999; }
  .mac-titlebar { min-height: 24px; gap: 5px; padding: 3px 5px; }
  .mac-title-control, .mac-title-controls::before, .mac-title-controls::after { width: 13px; height: 13px; flex-basis: 13px; border-width: 1px; }
  .mac-title-stripes { height: 14px; }
  .mac-title { font-size: 13px; }
  .mac-nav { min-height: 37px; gap: 16px; margin-top: 2px; padding: 3px 6px; overflow-x: auto; }
  .mac-nav a { font-size: 15px; }
  h1.title { margin-bottom: 22px; }
  table { display: block; overflow-x: auto; }
  .mac-statusbar {
    flex-wrap: nowrap;
    gap: 5px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .mac-statusbar::-webkit-scrollbar { display: none; }
  .mac-status-context,
  .mac-status-updated,
  .mac-status-credit {
    flex: 0 0 auto;
    overflow: visible;
    text-overflow: clip;
  }
  .mac-status-credit { max-width: none; }
}
