/* Google Search / Google Scholar minimalist web layout */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: #ffffff;
  color: #202124;
  font-family: Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font-family: inherit;
}

code {
  font-family: Consolas, "Roboto Mono", "Cascadia Mono", ui-monospace, monospace;
  font-size: 13px;
  color: #202124;
  background: #f1f3f4;
  padding: 1px 4px;
  border-radius: 2px;
}

/* Header: Google Search exact two-row geometry */
.top {
  background: #ffffff;
  border-bottom: 1px solid #ebebeb;
  padding-top: 20px;
}

.top-row {
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 24px;
}

.site-name {
  width: 120px;
  flex-shrink: 0;
  font-size: 20px;
  font-weight: 400;
  color: #202124;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.site-name:hover {
  color: #1a73e8;
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 652px;
  display: flex;
  align-items: center;
}

.search-input {
  width: 100%;
  height: 44px;
  padding: 0 74px 0 20px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  background: #ffffff;
  color: #202124;
  font-size: 15px;
  outline: none;
}

.search-input::placeholder {
  color: #80868b;
}

.search-input:hover,
.search-input:focus {
  border-color: rgba(223, 225, 229, 0);
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.24);
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  position: absolute;
  right: 44px;
  border: 0;
  background: transparent;
  color: #70757a;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}

.search-clear:hover {
  color: #202124;
}

.search-icon {
  position: absolute;
  right: 16px;
  color: #4285f4;
  display: inline-flex;
  pointer-events: none;
}

.top-action {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #5f6368;
  font-size: 13px;
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
}

.top-action:hover {
  color: #202124;
  text-decoration: underline;
}

/* Google Search underline tab strip aligned directly under the search box */
.tabs {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  padding: 0 28px 0 172px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0 2px 12px;
  font-size: 14px;
  color: #5f6368;
  cursor: pointer;
  white-space: nowrap;
}

.tab:hover {
  color: #202124;
}

.tab[aria-selected="true"] {
  color: #1a73e8;
}

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #1a73e8;
}

/* Main Google Search 652px left-aligned content column */
.page {
  padding: 12px 28px 72px 172px;
  max-width: 852px;
}

.stats-line {
  font-size: 13px;
  color: #70757a;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.inline-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #1a0dab;
  font-size: 13px;
  cursor: pointer;
}

.inline-link:hover {
  text-decoration: underline;
}

.inline-link--muted {
  color: #70757a;
}

/* Section blocks — pure whitespace & 1px hairlines, zero cards */
.sec {
  margin-bottom: 36px;
}

.sec-title {
  font-size: 20px;
  font-weight: 400;
  color: #202124;
  margin: 0 0 8px;
  padding-top: 8px;
}

.sec-sub {
  font-size: 13.5px;
  color: #4d5156;
  margin: 0 0 14px;
}

.flow-line {
  font-size: 14px;
  color: #202124;
  margin: 0 0 8px;
}

.flow-sep {
  color: #9aa0a6;
  margin: 0 6px;
}

/* Plain key-value environment lines */
.env-lines {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
  color: #4d5156;
}

.env-lines li {
  margin-bottom: 4px;
}

.env-k {
  color: #70757a;
  margin-right: 6px;
}

.warn-word {
  color: #c5221f;
}

/* Question entry — styled like a Google Search / Scholar result item */
.entry {
  padding: 18px 0;
  border-top: 1px solid #ebebeb;
}

.entry:first-child {
  border-top: 0;
  padding-top: 4px;
}

.entry-cite {
  font-size: 12.5px;
  color: #4d5156;
  margin-bottom: 2px;
}

.entry-cite__warn {
  color: #c5221f;
}

.entry-title-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.35;
  color: #1a0dab;
  text-align: left;
  cursor: pointer;
}

.entry-title-btn:hover {
  text-decoration: underline;
}

.entry-format {
  font-size: 13.5px;
  color: #4d5156;
  margin: 0 0 10px;
}

.entry-format__label {
  color: #006621;
  margin-right: 4px;
}

.entry-body {
  display: block;
}

.entry.is-collapsed .entry-body {
  display: none;
}

/* Plain Google-style checklist */
.checks {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.checks li {
  margin: 4px 0;
}

.checks label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  cursor: pointer;
  color: #3c4043;
}

.checks input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 4px 0 0;
  accent-color: #1a73e8;
  cursor: pointer;
}

.checks input:checked + span {
  color: #9aa0a6;
  text-decoration: line-through;
}

.checks strong {
  font-weight: 600;
  color: inherit;
}

/* Simple directly-editable monospace note field (no card chrome) */
.note-area {
  width: 100%;
  margin: 8px 0 10px;
  padding: 8px 10px;
  border: 1px solid #ebebeb;
  border-radius: 2px;
  background: #f8f9fa;
  color: #3c4043;
  font-family: Consolas, "Roboto Mono", ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1.6;
  resize: vertical;
  min-height: 76px;
}

.note-area:focus {
  outline: none;
  background: #ffffff;
  border-color: #1a73e8;
}

/* Plain inline pitfall / clue text (no pink/blue boxes) */
.tip-line {
  font-size: 13.5px;
  color: #4d5156;
  margin: 8px 0 0;
}

.tip-line--warn strong {
  color: #c5221f;
  font-weight: 600;
}

.tip-line--info strong {
  color: #202124;
  font-weight: 600;
}

.entry-foot {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  font-size: 12.5px;
}

/* Simple clean horizontal-rule tables */
.tbl-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 10px 0 16px;
}

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.tbl th {
  text-align: left;
  font-weight: 400;
  color: #70757a;
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid #dfe1e5;
  white-space: nowrap;
}

.tbl td {
  padding: 8px 10px 8px 0;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: top;
  color: #3c4043;
}

.tbl tr.hl td {
  color: #202124;
  font-weight: 600;
}

.mono {
  font-family: Consolas, "Roboto Mono", ui-monospace, monospace;
  font-size: 13px;
  white-space: nowrap;
}

.bad {
  color: #c5221f;
}

.good {
  color: #006621;
}

/* Plain mnemonic & oral lines */
.verse {
  margin: 0 0 24px;
  padding-left: 12px;
  border-left: 2px solid #dfe1e5;
  color: #3c4043;
  line-height: 1.9;
}

.verse p {
  margin: 0;
}

.oral {
  list-style: none;
  margin: 0;
  padding: 0;
}

.oral li {
  padding: 6px 0;
  border-bottom: 1px solid #f1f3f4;
}

.oral label {
  display: grid;
  grid-template-columns: 24px 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  cursor: pointer;
  color: #202124;
}

.oral .idx {
  color: #70757a;
  font-size: 13px;
}

.oral input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 4px 0 0;
  accent-color: #1a73e8;
}

.oral input:checked + span {
  color: #9aa0a6;
  text-decoration: line-through;
}

.empty-msg {
  color: #4d5156;
  padding: 20px 0;
}

.foot {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid #ebebeb;
  font-size: 12.5px;
  color: #70757a;
}

/* Responsive (Mobile & Tablet) */
@media (max-width: 900px) {
  .top {
    padding-top: 14px;
  }

  .top-row {
    flex-wrap: wrap;
    padding: 0 16px;
    gap: 10px;
  }

  .site-name {
    width: auto;
    font-size: 18px;
  }

  .search-wrap {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
  }

  .search-input {
    height: 40px;
    font-size: 14px;
  }

  .tabs {
    padding: 0 16px;
    gap: 18px;
  }

  .page {
    padding: 12px 16px 56px;
    max-width: 100%;
  }
}

/* Print / Save PDF */
@media print {
  @page {
    size: A4;
    margin: 14mm;
  }

  .top,
  .stats-line,
  .entry-foot {
    display: none !important;
  }

  .page {
    padding: 0;
    max-width: 100%;
  }

  .entry {
    break-inside: avoid;
  }

  .entry.is-collapsed .entry-body {
    display: block !important;
  }

  .entry-title-btn {
    color: #000000;
  }

  .note-area {
    border: 1px solid #dcdcdc;
    background: #ffffff;
  }
}
