/* find.cn — 极简百度风 */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", Arial, sans-serif;
  background: #fff;
  color: #222;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  border-bottom: 1px solid #f0f0f0;
}
.logo {
  font-family: serif;
  font-size: 24px;
  font-weight: bold;
  color: #2266dd;
  letter-spacing: -0.5px;
}
.logo span { color: #ed6c00; }
.topnav a {
  margin-left: 18px;
  font-size: 13px;
  color: #444;
  text-decoration: none;
}
.topnav a:hover { color: #2266dd; }

.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 60px 20px 40px;
}

.search-form {
  display: flex;
  width: 100%;
  max-width: 640px;
  margin-bottom: 36px;
}
.search-input {
  flex: 1;
  font-size: 16px;
  padding: 12px 16px;
  border: 2px solid #2266dd;
  border-right: none;
  outline: none;
  border-radius: 4px 0 0 4px;
}
.search-button {
  background: #2266dd;
  color: #fff;
  font-size: 16px;
  border: none;
  padding: 0 28px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: 600;
}
.search-button:hover { background: #1955b8; }

.search-meta {
  color: #999;
  font-size: 13px;
  margin-bottom: 16px;
}

.search-result {
  display: block;
  text-decoration: none;
  margin-bottom: 22px;
  color: inherit;
}
.search-result-title {
  font-size: 18px;
  color: #2440b3;
  margin-bottom: 4px;
}
.search-result:hover .search-result-title { text-decoration: underline; }
.search-result-source {
  font-size: 12px;
  color: #008000;
  margin-bottom: 4px;
}
.search-result-snippet {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.search-fallback {
  color: #999;
  font-size: 14px;
}

.page-foot {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  padding: 30px 20px;
  border-top: 1px solid #f0f0f0;
  margin-top: 80px;
}
.page-foot .hot { margin-top: 8px; }
.page-foot .brand-strip {
  display: flex; gap: 8px; align-items: center; justify-content: center;
  margin-bottom: 8px; color: #666;
}
.page-foot .brand-strip img { height: 36px; vertical-align: middle; }
.page-foot .brand-strip strong { color: #1e3a8a; }

/* —— 双栏布局 + 右侧便利贴 —— */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 36px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 28px;
}
.layout > main { padding: 60px 0 40px; max-width: none; }

.side-notes {
  padding: 70px 0 40px;
  display: flex; flex-direction: column; gap: 14px;
  position: sticky; top: 12px; align-self: start;
}
.note-card {
  background: #fff8c5;
  border: 1px solid #f3d97e;
  border-left: 4px solid #f59e0b;
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 13px;
  color: #5b4500;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transform: rotate(-0.4deg);
  position: relative;
}
.note-card + .note-card { transform: rotate(0.6deg); }
.note-card + .note-card + .note-card { transform: rotate(-0.3deg); }
.note-card + .note-card + .note-card + .note-card { transform: rotate(0.4deg); }
.note-pin {
  position: absolute; top: -10px; left: 10px;
  font-size: 18px;
}
.note-title { font-weight: 700; margin-bottom: 4px; color: #92400e; }
.note-body { line-height: 1.5; }
.note-body code { background: #fff; padding: 0 3px; border-radius: 2px; font-size: 12px; color: #92400e; }

/* details/summary 折叠（默认展开，桌面端） */
details.note-card { padding: 0; }
details.note-card > summary {
  list-style: none;
  padding: 12px 14px;
  cursor: pointer;
}
details.note-card > summary::-webkit-details-marker { display: none; }
details.note-card[open] > summary { padding-bottom: 6px; }
details.note-card > .note-body { padding: 0 14px 14px; }
details.note-card .caret {
  display: inline-block;
  margin-left: 6px;
  font-size: 14px;
  color: #b45309;
  transition: transform .2s;
}
details.note-card[open] .caret { transform: rotate(180deg); }

.notebook-card {
  background: linear-gradient(180deg, #fefefe 0%, #fafafa 100%);
  border: 1px solid #d4cdb8;
  border-radius: 8px;
  padding: 16px 18px 18px;
  box-shadow: 0 4px 14px rgba(60, 50, 30, 0.08), 0 1px 2px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.notebook-card::before {
  content: ''; position: absolute; top: 0; left: 20px; right: 20px; height: 3px;
  background: linear-gradient(90deg, transparent, #c9b56b 30%, #c9b56b 70%, transparent);
  border-radius: 0 0 4px 4px;
}
.notebook-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #6b5d3a;
  padding-bottom: 8px; border-bottom: 1px dashed #d4cdb8;
}
.notebook-title { font-weight: 600; color: #3d3520; font-size: 14px; letter-spacing: 0.5px; }
.notebook-meta { font-size: 11px; color: #9c8f6b; font-style: italic; }
.notebook-card textarea {
  width: 100%; box-sizing: border-box;
  min-height: 420px; resize: vertical;
  border: 0;
  padding: 8px 12px 12px;
  font-family: "Bradley Hand", "Marker Felt", "PingFang SC", -apple-system, sans-serif;
  font-size: 14px; line-height: 24px; color: #2c2416;
  background: repeating-linear-gradient(
    to bottom, transparent 0, transparent 23px, #e8e0c8 23px, #e8e0c8 24px
  );
  outline: none;
}
.notebook-card textarea::placeholder { color: #b5a888; font-style: italic; }
.notebook-card textarea:focus { background: repeating-linear-gradient(
    to bottom, #fffef9 0, #fffef9 23px, #d9cfac 23px, #d9cfac 24px
  ); }

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 14px;
  }
  .layout > main { padding: 24px 0 24px; }
  .side-notes { position: static; padding-top: 0; padding-bottom: 24px; gap: 12px; }
  .container { padding: 24px 0; max-width: 100%; }
}

@media (max-width: 640px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .logo { font-size: 20px; }
  .topnav a { margin-left: 12px; font-size: 12px; }
  .topnav a:nth-child(2),
  .topnav a:nth-child(3) { display: none; } /* 资讯/视频在窄屏隐藏 */

  .search-form { width: 100%; margin-bottom: 22px; }
  .search-input { font-size: 16px; padding: 10px 12px; } /* 16px 防 iOS 自动放大 */
  .search-button { padding: 0 16px; font-size: 14px; }

  .search-result { margin-bottom: 18px; }
  .search-result-title { font-size: 16px; }
  .search-result-snippet { font-size: 13px; }

  /* 便利贴：移动端收紧 */
  .note-card {
    transform: none !important;
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.55;
  }
  .note-body { line-height: 1.55; }

  /* 手机端：tips 默认展开 ＋ 更醒目的箭头 */
  details.note-card.mobile-collapsible .caret { color: #b45309; font-size: 15px; }

  /* 笔记本：移动端默认折叠，减少占地 */
  .notebook-card { padding: 12px 14px 14px; }
  .notebook-card textarea {
    min-height: 160px;
    font-size: 15px; /* iOS focus 不放大 */
    line-height: 22px;
    background: repeating-linear-gradient(
      to bottom, transparent 0, transparent 21px, #e8e0c8 21px, #e8e0c8 22px
    );
  }
  .notebook-card textarea:focus { background: repeating-linear-gradient(
      to bottom, #fffef9 0, #fffef9 21px, #d9cfac 21px, #d9cfac 22px
    ); }

  .page-foot { padding: 20px 14px; margin-top: 32px; font-size: 11px; }
  .page-foot .brand-strip img { height: 28px; }
}

@media (max-width: 540px) {
  .topbar { padding: 8px 10px; }
  .container { padding-top: 18px; }
}
