/* Wednesdata home (www.wednesdata.com).
   Loaded only by the Ghost "Home" page's HTML card, so the page-level rules below touch that page alone.
   Everything inside the page is scoped to #wednesdata-home: the id outranks the Source theme's .gh-content rules
   and the site's code injection, which forces Spoqa Han Sans Neo with !important on element selectors. */

/* Nanum Pen Script for the handwritten line under the latest chart. text= limits the download to the glyphs
   that line can use (digits, 요일, 에 보낸 차트); add a character here before writing it into .wd-pen. */
@import url('https://fonts.googleapis.com/css2?family=Nanum+Pen+Script&display=swap&text=%200123456789%EA%B8%88%EB%82%B8%EB%AA%A9%EB%B3%B4%EC%88%98%EC%97%90%EC%9A%94%EC%9B%94%EC%9D%BC%EC%B0%A8%ED%86%A0%ED%8A%B8%ED%99%94');

/* Ghost page frame (Source theme): no title block, the card spans the whole width,
   no line under the menu and no gap above the footer, so the header and the hero read as one dark block */
.gh-article-header { display: none !important; }
.gh-content > #wednesdata-home { grid-column: 1 / -1; margin: 0 !important; max-width: none; }
.gh-navigation.is-stacked .gh-navigation-menu::after { display: none; }
/* At / Ghost renders the page with home-template, not page-template, so the theme's 120px gap above the footer
   (removed only for .page-template) comes back; the collaboration band should sit right on the footer */
.gh-footer { margin-top: 0 !important; }

/* Until home.js has placed home.html: hold the hero's space in the header colour. The form waits out of sight,
   and shows on its own after 3 seconds in case home.js never runs */
#wednesdata-home:not([data-ready]) { min-height: 680px; padding: 64px 24px; background: #1b1b1b; }
#wednesdata-home:not([data-ready]) > form { max-width: 520px; margin: 0 auto; visibility: hidden; animation: wd-reveal 0s 3s forwards; }
@keyframes wd-reveal { to { visibility: visible; } }

#wednesdata-home { color: #1b1b1b; font-size: 16px; line-height: 1.7; letter-spacing: normal; word-break: keep-all; overflow-wrap: break-word; }
#wednesdata-home * { box-sizing: border-box; }
#wednesdata-home h1, #wednesdata-home h2, #wednesdata-home h3, #wednesdata-home p,
#wednesdata-home ol, #wednesdata-home li, #wednesdata-home figure { margin: 0; padding: 0; letter-spacing: normal; }
#wednesdata-home ol { list-style: none; }
#wednesdata-home a { color: inherit; text-decoration: none; box-shadow: none; }
#wednesdata-home a:focus-visible { outline: 2px solid #ffcc00; outline-offset: 3px; }
#wednesdata-home img { display: block; width: 100%; height: auto; margin: 0; }

#wednesdata-home .wd-in { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
#wednesdata-home .wd-sec { padding: 96px 0; }
#wednesdata-home .wd-gray { background: #f4f4f4; }
#wednesdata-home h2 { font-size: 30px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }
#wednesdata-home .wd-more { font-size: 15px; font-weight: 700; white-space: nowrap; }
#wednesdata-home .wd-more:hover { text-decoration: underline; }

/* Hero: starts in the navigation bar's #1b1b1b and darkens only slightly toward the bottom */
#wednesdata-home .wd-hero { background: linear-gradient(180deg, #1b1b1b 0%, #1b1b1b 45%, #242424 100%); color: #ffffff; padding: 64px 0 80px; }
#wednesdata-home .wd-hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); column-gap: 72px; align-items: center; }
#wednesdata-home .wd-eyebrow { font-size: 15px; font-weight: 500; line-height: 1.5; color: #a8a8a8; }
#wednesdata-home .wd-hero h1 { margin-top: 16px; font-size: 54px; line-height: 1.2; font-weight: 700; letter-spacing: -0.025em; color: #ffffff; }
#wednesdata-home .wd-lead { margin-top: 24px; max-width: 34em; font-size: 18px; line-height: 1.75; color: #cfcfcf; }
#wednesdata-home .wd-signup { margin-top: 36px; max-width: 520px; }
#wednesdata-home .wd-fallback { margin-top: 28px; font-size: 15px; color: #cfcfcf; }
#wednesdata-home .wd-fallback a { text-decoration: underline; }

/* Subscribe form. Its markup is in the Ghost card (Portal binds it on page load); Portal adds
   .loading, .success and .error to the form and writes its own message into [data-members-error] */
#wednesdata-home .wd-form-row { display: flex; gap: 8px; }
#wednesdata-home .wd-input { flex: 1 1 auto; min-width: 0; height: 54px; margin: 0; padding: 0 18px; border: 0; border-radius: 8px; background: #ffffff; color: #1b1b1b; font: inherit; font-size: 16px; line-height: 54px; }
#wednesdata-home .wd-input::placeholder { color: #8c8c8c; }
#wednesdata-home .wd-input:focus { outline: 3px solid rgba(255, 204, 0, 0.7); outline-offset: 2px; }
#wednesdata-home .wd-btn { height: 54px; margin: 0; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; font: inherit; font-size: 16px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; }
#wednesdata-home .wd-btn-accent { background: #ffcc00; color: #1b1b1b; }
#wednesdata-home .wd-btn-accent:hover { background: #ffd633; }
#wednesdata-home .wd-btn-dark { background: #1b1b1b; color: #ffffff; }
#wednesdata-home .wd-btn-dark:hover { background: #3a3a3a; }
#wednesdata-home .wd-btn-busy { display: none; }
#wednesdata-home .wd-form.loading .wd-btn-idle { display: none; }
#wednesdata-home .wd-form.loading .wd-btn-busy { display: inline; }
#wednesdata-home .wd-form.loading .wd-btn { opacity: 0.75; pointer-events: none; }
#wednesdata-home .wd-form-note { margin-top: 12px; font-size: 14px; line-height: 1.5; color: #8c8c8c; }
#wednesdata-home .wd-form-success { display: none; padding: 16px 18px; border: 1px solid rgba(255, 204, 0, 0.55); border-radius: 8px; background: rgba(255, 204, 0, 0.1); color: #ffffff; font-size: 16px; font-weight: 500; line-height: 1.6; }
#wednesdata-home .wd-form.success .wd-form-row,
#wednesdata-home .wd-form.success .wd-form-note { display: none; }
#wednesdata-home .wd-form.success .wd-form-success { display: block; }
#wednesdata-home .wd-form-error { display: none; margin-top: 12px; font-size: 14px; line-height: 1.5; color: #ff8a80; }
#wednesdata-home .wd-form.error .wd-form-error { display: block; }
#wednesdata-home .wd-form-error:empty::before { content: "메일을 보내지 못했습니다. 주소를 확인하고 다시 시도해 주세요."; }

/* Latest issue (filled from /featured/rss/ by home.js) */
#wednesdata-home .wd-latest-img { display: block; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 6px; background: #1b1b1b; box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45); }
#wednesdata-home .wd-latest-img img, #wednesdata-home .wd-issue img { aspect-ratio: 3 / 4; object-fit: cover; }
#wednesdata-home .wd-latest figcaption { margin-top: 18px; padding: 0; display: flex; flex-direction: column; font-size: 16px; text-align: left; }
#wednesdata-home .wd-pen, #wednesdata-home .wd-pen * { font-family: "Nanum Pen Script", "Spoqa Han Sans Neo", sans-serif !important; font-weight: 400; }
#wednesdata-home .wd-pen { font-size: 28px; line-height: 1.2; color: #ffffff; }
#wednesdata-home .wd-pen-date { color: #ffcc00; }
#wednesdata-home .wd-latest-title { margin-top: 8px; font-size: 18px; line-height: 1.5; font-weight: 700; color: #ffffff; }
#wednesdata-home .wd-latest-title:hover { text-decoration: underline; }
#wednesdata-home .wd-latest-meta { margin-top: 2px; display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 14px; line-height: 1.5; }
#wednesdata-home .wd-latest-data { color: #a8a8a8; }
#wednesdata-home .wd-latest-read { font-weight: 700; color: #ffffff; }
#wednesdata-home .wd-latest-read:hover { text-decoration: underline; }
/* An issue without a feature image gets a dark card with its data name instead of a chart */
#wednesdata-home .wd-noimg { aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; padding: 24px; border-radius: 6px; background: #1b1b1b; color: #ffffff; font-size: 18px; font-weight: 700; line-height: 1.5; text-align: center; }

/* How each issue is made */
#wednesdata-home .wd-format { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 64px; }
#wednesdata-home .wd-num { display: inline-block; padding-bottom: 4px; border-bottom: 3px solid #ffcc00; font-size: 14px; font-weight: 700; line-height: 1.4; }
#wednesdata-home .wd-format h3 { margin-top: 16px; font-size: 21px; line-height: 1.4; font-weight: 700; }
#wednesdata-home .wd-format p { margin-top: 8px; font-size: 16px; line-height: 1.75; color: #4a4a4a; }

/* The four issues before the latest (filled from /featured/rss/ by home.js) */
#wednesdata-home .wd-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; }
#wednesdata-home .wd-issues { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; }
#wednesdata-home .wd-issue { display: flex; flex-direction: column; min-width: 0; }
#wednesdata-home .wd-issue img { border-radius: 6px; background: #1b1b1b; }
#wednesdata-home .wd-issue-date { margin-top: 14px; font-size: 13px; line-height: 1.5; color: #737373; }
#wednesdata-home .wd-issue-title { margin-top: 4px; font-size: 16px; line-height: 1.5; font-weight: 700; }
#wednesdata-home .wd-issue:hover .wd-issue-title { text-decoration: underline; }
#wednesdata-home .wd-issue-data { margin-top: 4px; font-size: 13px; line-height: 1.5; color: #737373; }

/* Notes, data, curation */
#wednesdata-home .wd-tiles { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
#wednesdata-home .wd-tile { display: flex; flex-direction: column; min-width: 0; padding: 28px 28px 24px; border: 1px solid #e0e0e0; border-radius: 10px; transition: border-color 0.15s; }
#wednesdata-home .wd-tile:hover { border-color: #1b1b1b; }
#wednesdata-home .wd-tile h3 { font-size: 21px; line-height: 1.4; font-weight: 700; }
#wednesdata-home .wd-tile p { margin-top: 10px; font-size: 15px; line-height: 1.75; color: #4a4a4a; }
#wednesdata-home .wd-tile .wd-more { margin-top: auto; padding-top: 20px; }

/* Collaboration band, right above the theme's dark footer */
#wednesdata-home .wd-collab { padding: 64px 0; background: #f4f4f4; }
#wednesdata-home .wd-collab-white { background: #ffffff; border-top: 1px solid #e6e6e6; }
#wednesdata-home .wd-collab-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
#wednesdata-home .wd-collab-text { flex: 1 1 520px; min-width: 0; }
#wednesdata-home .wd-label { font-size: 13px; font-weight: 700; line-height: 1.5; color: #737373; }
#wednesdata-home .wd-collab-lead { margin-top: 8px; max-width: 30em; font-size: 22px; line-height: 1.55; font-weight: 700; }

/* Narrow screens: one column hero, two issues per row, stacked tiles */
@media (max-width: 959px) {
  #wednesdata-home .wd-hero-in { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
  #wednesdata-home .wd-latest { max-width: 420px; }
  #wednesdata-home .wd-issues { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #wednesdata-home .wd-tiles { grid-template-columns: minmax(0, 1fr); }
}

/* Phones: the same 767px breakpoint the Source theme uses for its navigation */
@media (max-width: 767px) {
  #wednesdata-home:not([data-ready]) { padding: 48px 20px; }
  #wednesdata-home .wd-in { padding: 0 20px; }
  #wednesdata-home .wd-sec { padding: 64px 0; }
  #wednesdata-home h2 { font-size: 24px; }
  #wednesdata-home .wd-hero { padding: 40px 0 56px; }
  #wednesdata-home .wd-eyebrow { font-size: 14px; }
  #wednesdata-home .wd-hero h1 { margin-top: 12px; font-size: 34px; line-height: 1.28; }
  #wednesdata-home .wd-lead { margin-top: 20px; font-size: 16px; }
  #wednesdata-home .wd-signup { margin-top: 28px; }
  #wednesdata-home .wd-form-row { flex-direction: column; }
  #wednesdata-home .wd-btn { width: 100%; }
  /* The chart goes between the title and the lead, narrower, so it is the first thing after the headline */
  #wednesdata-home .wd-hero-text { display: contents; }
  #wednesdata-home .wd-eyebrow { order: 1; }
  #wednesdata-home .wd-hero h1 { order: 2; margin-top: 0; }
  #wednesdata-home .wd-latest { order: 3; max-width: 320px; margin: 0 auto; width: 100%; }
  #wednesdata-home .wd-lead { order: 4; margin-top: 0; }
  #wednesdata-home .wd-signup { order: 5; margin-top: 0; }
  #wednesdata-home .wd-fallback { order: 6; margin-top: 0; }
  #wednesdata-home .wd-hero-in { row-gap: 24px; }
  #wednesdata-home .wd-pen { font-size: 26px; }
  #wednesdata-home .wd-format { margin-top: 32px; grid-template-columns: minmax(0, 1fr); gap: 36px; }
  #wednesdata-home .wd-format h3 { font-size: 19px; }
  #wednesdata-home .wd-format p { font-size: 15px; }
  #wednesdata-home .wd-issues { margin-top: 24px; gap: 28px 16px; }
  #wednesdata-home .wd-issue-title { font-size: 15px; }
  #wednesdata-home .wd-tiles { margin-top: 24px; gap: 16px; }
  #wednesdata-home .wd-tile { padding: 24px 22px 20px; }
  #wednesdata-home .wd-tile h3 { font-size: 19px; }
  #wednesdata-home .wd-collab { padding: 56px 0; }
  #wednesdata-home .wd-collab-lead { font-size: 19px; }
}
