:root {
  --aph-blue: #2878d4;
  --aph-blue-dark: #185eaf;
  --aph-blue-soft: #eef6ff;
  --aph-ink: #24344c;
  --aph-muted: #68768a;
  --aph-line: #dce4ee;
  --aph-bg: #f6f9fc;
  --aph-card: #fff;
}

.aps-home-prototype-page #sidebar,
.aps-home-prototype-page .sidebar { display: none !important; }
.aps-home-prototype-page #main,
.aps-home-prototype-page .main { width: 100% !important; float: none !important; }
.aps-home-prototype-page .content-in { display: block !important; }
.aps-home-prototype-page .entry-title,
.aps-home-prototype-page .article-header > .entry-title,
.aps-home-prototype-page .breadcrumb { display: none !important; }
.aps-home-prototype-page .article { margin-bottom: 0; }

/* TOP prototype: Cocoon article-only UI is unnecessary here. */
.aps-home-prototype-page #toc,
.aps-home-prototype-page .toc,
.aps-home-prototype-page .toc-container,
.aps-home-prototype-page .toc-content,
.aps-home-prototype-page .article-header .date-tags,
.aps-home-prototype-page .article-header .post-date,
.aps-home-prototype-page .article-header .post-update,
.aps-home-prototype-page .article-header .entry-date,
.aps-home-prototype-page .date-tags,
.aps-home-prototype-page .post-date,
.aps-home-prototype-page .post-update {
  display: none !important;
}

.aps-home { color: var(--aph-ink); font-family: inherit; }
.aps-home *, .aps-home *::before, .aps-home *::after { box-sizing: border-box; }

.aps-home-hero {
  margin: 0 0 32px;
  border: 1px solid #d9e8f9;
  border-radius: 22px;
  background: linear-gradient(180deg, #f4f9ff 0%, #fff 82%);
  overflow: visible;
}
.aps-home-hero-inner { max-width: 900px; margin: 0 auto; padding: 46px 34px 34px; text-align: center; }
.aps-home-kicker { margin: 0 0 8px; color: var(--aph-blue); font-weight: 800; font-size: 13px; letter-spacing: .08em; }
.aps-home-hero h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.25; }
.aps-home-lead { max-width: 680px; margin: 13px auto 24px; color: var(--aph-muted); line-height: 1.75; }

.aps-home-searchbox { position: relative; max-width: 720px; margin: 0 auto; text-align: left; z-index: 15; }
.aps-home-input-wrap { position: relative; display: block; }
.aps-home-input-wrap input {
  width: 100%; min-height: 58px; padding: 13px 52px 13px 18px;
  border: 2px solid #a9c9ec; border-radius: 14px; background: #fff;
  color: var(--aph-ink); font: inherit; font-size: 16px; outline: none;
  box-shadow: 0 8px 24px rgba(28, 78, 132, .08);
}
.aps-home-input-wrap input:focus { border-color: var(--aph-blue); box-shadow: 0 0 0 4px rgba(40,120,212,.10), 0 8px 24px rgba(28,78,132,.08); }
.aps-home-search-icon { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); color: var(--aph-blue); font-size: 27px; pointer-events: none; }
.aps-home-suggestions {
  position: absolute; left: 0; right: 0; top: calc(100% + 7px); z-index: 30;
  border: 1px solid var(--aph-line); border-radius: 13px; background: #fff;
  box-shadow: 0 14px 34px rgba(29, 60, 95, .16); overflow: hidden;
}
.aps-home-suggestion { width: 100%; border: 0; background: #fff; padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer; color: var(--aph-ink); }
.aps-home-suggestion + .aps-home-suggestion { border-top: 1px solid #edf1f5; }
.aps-home-suggestion:hover { background: #f4f9ff; }
.aps-home-suggestion span { font-weight: 750; }
.aps-home-suggestion small { color: var(--aph-muted); white-space: nowrap; }

.aps-home-selected { max-width: 720px; margin: 13px auto 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.aps-home-chip { border: 1px solid #8fb9eb; border-radius: 999px; background: #fff; color: var(--aph-blue); padding: 7px 11px; cursor: pointer; font-weight: 700; }
.aps-home-actions { max-width: 720px; margin: 17px auto 0; padding-top: 16px; border-top: 1px solid #e5edf6; display: flex; align-items: center; justify-content: space-between; gap: 18px; text-align: left; }
.aps-home-count { color: var(--aph-muted); font-size: 14px; }
.aps-home-count strong { color: var(--aph-blue); font-size: 18px; }
.aps-home-action-buttons { display: flex; gap: 9px; align-items: center; }
.aps-home-detail-link, .aps-home-submit { min-height: 44px; border-radius: 10px; padding: 10px 15px; font: inherit; font-weight: 800; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.aps-home-detail-link { border: 1px solid #9ec3ed; background: #fff; color: var(--aph-blue); }
.aps-home-detail-link[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.aps-home-submit { border: 0; background: var(--aph-blue); color: #fff; cursor: pointer; }
.aps-home-submit:hover:not(:disabled) { background: var(--aph-blue-dark); }
.aps-home-submit:disabled { background: #aeb9c7; cursor: not-allowed; }

.aps-home-section { margin: 0 0 34px; }
.aps-home-section-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 15px; }
.aps-home-section-head h2 { margin: 0 0 5px; font-size: 23px; }
.aps-home-section-head p { margin: 0; color: var(--aph-muted); font-size: 14px; }
.aps-home-section-head > a { white-space: nowrap; color: var(--aph-blue); font-weight: 750; text-decoration: none; }

.aps-home-shortcut-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.aps-home-shortcut { min-height: 54px; border: 1px solid #ccd9e8; border-radius: 12px; background: #fff; color: var(--aph-ink); padding: 10px; cursor: pointer; font-weight: 750; box-shadow: 0 2px 7px rgba(37,57,82,.03); }
.aps-home-shortcut:hover { border-color: #8ab6e8; background: #f8fbff; }
.aps-home-shortcut.is-selected { border-color: #72a9e8; background: var(--aph-blue-soft); color: var(--aph-blue); box-shadow: inset 0 0 0 1px #d3e8ff; }

.aps-home-latest-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.aps-home-card { min-width: 0; border: 1px solid #e0e7ef; border-radius: 13px; overflow: hidden; background: #fff; }
.aps-home-card > a { display: block; color: inherit; text-decoration: none; }
.aps-home-card-thumb { display: flex; width: 100%; aspect-ratio: 16/10; background: #eef2f7; overflow: hidden; align-items: center; justify-content: center; }
.aps-home-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aps-home-noimage { color: var(--aph-muted); font-size: 13px; }
.aps-home-card-body { display: block; padding: 11px 12px 13px; }
.aps-home-card-body time { display: block; color: var(--aph-muted); font-size: 11px; margin-bottom: 5px; }
.aps-home-card-body strong { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.5; }
.aps-home-card > a:hover strong { color: var(--aph-blue); }

@media (max-width: 860px) {
  .aps-home-hero { border-radius: 16px; margin-bottom: 25px; }
  .aps-home-hero-inner { padding: 30px 15px 22px; }
  .aps-home-lead { font-size: 14px; margin-bottom: 18px; }
  .aps-home-input-wrap input { min-height: 52px; font-size: 15px; }
  .aps-home-actions { display: block; text-align: center; }
  .aps-home-count { margin-bottom: 11px; }
  .aps-home-action-buttons { display: grid; grid-template-columns: 1fr 1fr; }
  .aps-home-section-head { align-items: start; }
  .aps-home-section-head p { font-size: 13px; }
  .aps-home-shortcut-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
  .aps-home-latest-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .aps-home-card-body { padding: 9px 9px 11px; }
  .aps-home-card-body strong { font-size: 13px; }
}

@media (max-width: 480px) {
  .aps-home-hero-inner { padding-left: 11px; padding-right: 11px; }
  .aps-home-actions { margin-top: 14px; }
  .aps-home-action-buttons { grid-template-columns: 1fr; }
  .aps-home-section-head { display: block; }
  .aps-home-section-head > a { display: inline-block; margin-top: 8px; }
  .aps-home-latest-grid { grid-template-columns: 1fr 1fr; }
}
