/*
Theme Name: 오늘의 투자
Theme URI: https://daytrading.click/
Author: 오늘의 투자
Description: Original Korean financial news portal theme inspired by common newspaper portal information architecture.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: oneul-ui-tuja
*/

:root {
  --otu-bg: #ffffff;
  --otu-text: #111111;
  --otu-muted: #555555;
  --otu-soft: #f6f6f3;
  --otu-line: #e5e5e5;
  --otu-yellow: #f3ec3d;
  --otu-green: #16a34a;
  --otu-red: #dc2626;
  --otu-blue: #1f5eff;
  --otu-dark: #111827;
  --otu-width: 1240px;
  --otu-font: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--otu-bg);
  color: var(--otu-text);
  font-family: var(--otu-font);
  line-height: 1.55;
  overflow-x: hidden;
}

body.otu-overlay-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--otu-blue);
}

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.otu-container {
  width: min(var(--otu-width), calc(100% - 32px));
  margin: 0 auto;
}

.otu-site-header {
  position: relative;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--otu-line);
}

.otu-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 42px;
  border-bottom: 1px solid var(--otu-line);
  color: var(--otu-muted);
  font-size: 13px;
}

.otu-toolbar-spacer {
  flex: 1;
}

.otu-icon-button,
.otu-link-button,
.otu-subscribe,
.otu-mini-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.otu-icon-button span {
  font-size: 12px;
}

.otu-subscribe {
  padding: 0 12px;
  border: 1px solid var(--otu-text);
  color: var(--otu-text);
  font-weight: 700;
}

.otu-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 92px;
  text-align: center;
  gap: 18px;
}

.otu-brand p {
  margin: 0;
  color: var(--otu-muted);
  font-size: 14px;
}

.otu-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--otu-text);
}

.otu-logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--otu-yellow);
  border: 2px solid var(--otu-text);
  font-weight: 900;
}

.otu-logo-text {
  font-size: 35px;
  font-weight: 900;
  letter-spacing: 0;
}

.otu-primary-nav {
  border-top: 1px solid var(--otu-line);
  border-bottom: 1px solid var(--otu-line);
  background: #fff;
}

.otu-nav-scroll {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 46px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.otu-nav-scroll::-webkit-scrollbar {
  display: none;
}

.otu-nav-scroll a {
  font-size: 15px;
  font-weight: 800;
}

.otu-nav-scroll a:hover {
  color: var(--otu-text);
  box-shadow: inset 0 -3px 0 var(--otu-yellow);
}

.otu-mega,
.otu-search {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(17, 24, 39, 0.48);
}

.otu-mega[hidden],
.otu-search[hidden],
[hidden] {
  display: none !important;
}

.otu-mega-panel {
  margin-top: 54px;
  background: #fff;
  border: 1px solid var(--otu-line);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}

.otu-mega-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--otu-line);
}

.otu-mega-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}

.otu-mega-item {
  min-height: 112px;
  padding: 18px;
  border-right: 1px solid var(--otu-line);
  border-bottom: 1px solid var(--otu-line);
}

.otu-mega-item strong,
.otu-mega-item span {
  display: block;
}

.otu-mega-item strong {
  margin-bottom: 8px;
  font-size: 18px;
}

.otu-mega-item span {
  color: var(--otu-muted);
  font-size: 13px;
}

.otu-search-panel {
  width: min(720px, calc(100% - 32px));
  margin: 84px auto 0;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--otu-line);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
}

.otu-search-close {
  float: right;
}

.otu-search-panel form {
  clear: both;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.otu-search-panel label {
  grid-column: 1 / -1;
  font-size: 26px;
  font-weight: 900;
}

.otu-search-panel input,
.otu-search-inline input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--otu-line);
}

.otu-search-panel button[type="submit"],
.otu-search-inline button,
.otu-main-story a {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--otu-text);
  background: var(--otu-text);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.otu-hot-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.otu-hot-keywords span,
.otu-hot-keywords a,
.otu-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  background: var(--otu-yellow);
  color: var(--otu-text);
  font-size: 12px;
  font-weight: 900;
}

.otu-home {
  padding-bottom: 52px;
}

.otu-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.85fr) minmax(280px, 0.75fr);
  gap: 24px;
  padding: 30px 0;
  border-bottom: 2px solid var(--otu-text);
}

.otu-main-story {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 390px;
}

.otu-main-story h1 {
  margin: 16px 0 12px;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.otu-main-story p {
  margin: 0 0 24px;
  color: var(--otu-muted);
  font-size: 17px;
  overflow-wrap: anywhere;
}

.otu-main-story a {
  width: max-content;
}

.otu-hero-image {
  overflow: hidden;
  align-self: stretch;
  background: var(--otu-dark);
}

.otu-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.otu-ranking,
.otu-side-rank {
  border-left: 1px solid var(--otu-line);
  padding-left: 22px;
}

.otu-ranking-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.otu-ranking-head strong {
  margin-right: auto;
  font-size: 20px;
}

.otu-ranking-head button {
  border: 1px solid var(--otu-line);
  background: #fff;
  min-height: 30px;
  padding: 0 9px;
  cursor: pointer;
}

.otu-ranking-head button.is-active {
  border-color: var(--otu-text);
  background: var(--otu-text);
  color: #fff;
}

.otu-ranking ol,
.otu-side-rank ol {
  margin: 0;
  padding-left: 22px;
}

.otu-ranking li,
.otu-side-rank li {
  padding: 11px 0;
  border-bottom: 1px solid var(--otu-line);
  font-weight: 800;
}

.otu-market-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  margin-top: 22px;
  background: var(--otu-line);
  border: 1px solid var(--otu-line);
}

.otu-market-strip div {
  background: #fff;
  padding: 15px;
}

.otu-market-strip span,
.otu-market-strip strong,
.otu-market-strip em {
  display: block;
}

.otu-market-strip span {
  color: var(--otu-muted);
  font-size: 12px;
}

.otu-market-strip strong {
  font-size: 21px;
}

.otu-market-strip em {
  font-style: normal;
  font-weight: 900;
}

.up {
  color: var(--otu-green);
}

.down {
  color: var(--otu-red);
}

.otu-ai-summary {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 28px;
  margin-top: 28px;
  padding: 26px;
  background: var(--otu-dark);
  color: #fff;
}

.otu-ai-summary h2 {
  margin: 12px 0 0;
  font-size: 28px;
}

.otu-ai-summary ul {
  margin: 0;
  padding-left: 20px;
}

.otu-ai-summary li {
  padding: 7px 0;
}

.otu-section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 34px;
}

.otu-channel-block {
  min-width: 0;
  padding-top: 16px;
  border-top: 3px solid var(--otu-text);
}

.otu-channel-block header,
.otu-shorts header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.otu-channel-block h2,
.otu-shorts h2 {
  margin: 0;
  font-size: 24px;
}

.otu-channel-block article {
  padding: 18px 0;
  border-bottom: 1px solid var(--otu-line);
}

.otu-channel-block h3 {
  margin: 8px 0;
  font-size: 21px;
  line-height: 1.25;
}

.otu-channel-block p {
  margin: 0;
  color: var(--otu-muted);
}

.otu-channel-block ul {
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
}

.otu-channel-block li {
  padding: 8px 0;
  border-bottom: 1px solid var(--otu-line);
  font-weight: 700;
}

.otu-shorts {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 3px solid var(--otu-text);
}

.otu-shorts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 16px;
}

.otu-shorts article {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  background: var(--otu-dark);
  color: #fff;
}

.otu-shorts img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 160ms ease;
}

.otu-shorts article:hover img {
  transform: scale(1.02);
}

.otu-shorts strong {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 44px;
  font-size: 17px;
  line-height: 1.3;
}

.otu-shorts span {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 3px 9px;
  background: var(--otu-yellow);
  color: var(--otu-text);
  font-size: 12px;
  font-weight: 900;
}

.otu-page-head {
  padding: 34px 0 22px;
  border-bottom: 2px solid var(--otu-text);
}

.otu-page-head h1 {
  margin: 12px 0 8px;
  font-size: 36px;
  letter-spacing: 0;
}

.otu-page-head p {
  margin: 0;
  color: var(--otu-muted);
}

.otu-archive-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 34px;
  padding: 28px 0 52px;
}

.otu-feed-item,
.otu-list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--otu-line);
}

.otu-feed-item h2,
.otu-list-item h2 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.25;
}

.otu-feed-item p,
.otu-list-item p {
  margin: 0 0 8px;
  color: var(--otu-muted);
}

.otu-feed-item span {
  color: var(--otu-muted);
  font-size: 13px;
}

.otu-side-rank h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.otu-single {
  padding-bottom: 56px;
}

.otu-article {
  max-width: 820px;
  margin: 0 auto;
  padding-top: 34px;
}

.otu-breadcrumb,
.otu-article-meta {
  color: var(--otu-muted);
  font-size: 13px;
}

.otu-article h1 {
  margin: 16px 0 12px;
  font-size: 42px;
  line-height: 1.16;
  letter-spacing: 0;
}

.otu-article-summary {
  color: var(--otu-muted);
  font-size: 19px;
}

.otu-article-image {
  width: 100%;
  margin: 24px 0;
}

.otu-ai-box {
  margin: 26px 0;
  padding: 22px;
  border-left: 5px solid var(--otu-yellow);
  background: var(--otu-soft);
}

.otu-ai-box h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.otu-content {
  font-size: 18px;
}

.otu-search-page {
  padding-bottom: 56px;
}

.otu-search-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 24px 0 10px;
}

.otu-fallback {
  padding: 34px 0 56px;
}

.otu-footer {
  background: var(--otu-dark);
  color: #fff;
  padding: 38px 0 24px;
}

.otu-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 34px;
}

.otu-footer-logo {
  display: block;
  margin-bottom: 10px;
  font-size: 26px;
  font-weight: 900;
}

.otu-footer p {
  margin: 0;
  color: #d1d5db;
}

.otu-footer h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.otu-footer a {
  display: block;
  color: #d1d5db;
  padding: 4px 0;
}

.otu-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: #d1d5db;
  font-size: 13px;
}

@media (max-width: 980px) {
  .otu-brand {
    min-height: 74px;
  }

  .otu-brand p {
    display: none;
  }

  .otu-logo-text {
    font-size: 28px;
  }

  .otu-hero,
  .otu-archive-layout {
    grid-template-columns: 1fr;
  }

  .otu-main-story {
    min-height: auto;
  }

  .otu-main-story h1,
  .otu-article h1 {
    font-size: 32px;
  }

  .otu-ranking,
  .otu-side-rank {
    border-left: 0;
    padding-left: 0;
  }

  .otu-market-strip,
  .otu-section-grid,
  .otu-shorts-grid,
  .otu-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .otu-ai-summary {
    grid-template-columns: 1fr;
  }

  .otu-mega-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .otu-container {
    width: min(100% - 22px, var(--otu-width));
  }

  .otu-toolbar {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 50;
  }

  .otu-mini-link,
  .otu-toolbar .otu-link-button:last-child {
    display: none;
  }

  .otu-logo-mark {
    width: 34px;
    height: 34px;
  }

  .otu-logo-text {
    font-size: 23px;
  }

  .otu-nav-scroll {
    gap: 18px;
  }

  .otu-hero {
    gap: 16px;
    padding-top: 18px;
  }

  .otu-main-story h1 {
    font-size: 29px;
    overflow-wrap: anywhere;
  }

  .otu-ranking-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .otu-ranking-head strong {
    flex-basis: 100%;
  }

  .otu-market-strip,
  .otu-section-grid,
  .otu-shorts-grid,
  .otu-footer-grid,
  .otu-mega-grid,
  .otu-search-panel form {
    grid-template-columns: 1fr;
  }

  .otu-footer-bottom {
    flex-direction: column;
  }

  .otu-search-inline {
    grid-template-columns: 1fr;
  }
}
