/*
Theme Name: Stocks Value
Theme URI: https://stocks-value.com/
Author: Stocks Value
Description: A focused WordPress theme for a public stock value judgment system.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: stockvalue
*/

:root {
  --bg: #f7f6f1;
  --surface: #ffffff;
  --ink: #1d2522;
  --muted: #5e6c66;
  --line: #d9ded7;
  --green: #164b3b;
  --green-2: #28715b;
  --amber: #b2782c;
  --shadow: 0 22px 60px rgba(29, 37, 34, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  line-height: 1.6;
}

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

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 220px;
}

.brand-mark {
  align-items: center;
  background: var(--green);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.top-nav a {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 10px;
}

.top-nav a:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.hero {
  display: grid;
  gap: clamp(28px, 5vw, 72px);
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  min-height: 620px;
  padding: clamp(48px, 8vw, 96px) clamp(18px, 4vw, 56px) 56px;
}

.hero-copy {
  align-self: center;
  max-width: 820px;
}

.eyebrow {
  color: var(--green-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 12px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 74px);
  line-height: 1.08;
  margin-bottom: 22px;
  max-width: 980px;
}

.hero-lede {
  color: var(--muted);
  font-size: 18px;
  max-width: 720px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 700;
  min-height: 46px;
  padding: 10px 16px;
}

.button.primary {
  background: var(--green);
  color: #fff;
}

.button.secondary {
  background: var(--surface);
  border: 1px solid var(--line);
}

.terminal-panel {
  align-self: center;
  background: #10231e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #eef6f2;
  overflow: hidden;
  padding: 18px;
}

.panel-top {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.panel-top span {
  background: #d7e2dc;
  border-radius: 99px;
  display: block;
  height: 9px;
  opacity: 0.78;
  width: 9px;
}

.signal-chart {
  align-items: end;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(12, 1fr);
  height: 260px;
  padding: 24px 6px 0;
}

.signal-chart span {
  background: linear-gradient(180deg, #7bd6ae, #cda46a);
  border-radius: 6px 6px 0 0;
  min-height: 16px;
}

.metric-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
  margin: 22px 0 0;
}

.metric-grid div {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
}

.metric-grid dt {
  color: #afc8bd;
  font-size: 12px;
}

.metric-grid dd {
  font-size: 20px;
  font-weight: 800;
  margin: 2px 0 0;
}

.workspace,
.research-table-section,
.page-shell {
  padding: 28px clamp(18px, 4vw, 56px) 64px;
}

.section-heading {
  margin-bottom: 20px;
  max-width: 760px;
}

.section-heading h2,
.page-title h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  margin-bottom: 10px;
}

.section-heading.compact h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.entry-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.entry-card,
.tool-card,
.article-list article,
.observation-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 210px;
  padding: 22px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.entry-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.entry-card.accent {
  border-color: rgba(178, 120, 44, 0.42);
}

.entry-icon {
  color: var(--amber);
  display: block;
  font-weight: 900;
  margin-bottom: 24px;
}

.entry-card h3,
.tool-card h2,
.article-list h2,
.observation-card h2 {
  font-size: 20px;
  line-height: 1.25;
  margin-bottom: 10px;
}

.entry-card p,
.tool-card p,
.article-list p,
.observation-card p,
.page-title p {
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 15px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.tag,
.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 9px;
}

.page-shell {
  min-height: calc(100vh - 150px);
}

.page-title {
  max-width: 820px;
  padding: 34px 0 24px;
}

.content-grid,
.article-list,
.observation-layout {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-list,
.observation-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.page-table {
  margin-top: 10px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 24px clamp(18px, 4vw, 56px);
}

.site-footer p {
  margin: 0;
}

.archive-shell,
.single-shell {
  margin: 0 auto;
  max-width: 1240px;
  width: 100%;
}

.single-shell {
  max-width: 1040px;
}

.single-article,
.research-card,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.single-article {
  padding: clamp(24px, 5vw, 64px);
}

.single-header {
  max-width: 900px;
  padding-top: 0;
}

.single-header h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
}

.single-header .eyebrow a,
.category-description a {
  color: var(--green-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.post-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.featured-image {
  margin: 0 0 32px;
}

.featured-image img,
.entry-content img {
  height: auto;
  max-width: 100%;
}

.entry-content {
  font-size: 17px;
  line-height: 1.85;
  max-width: 900px;
}

.entry-content > :first-child {
  margin-top: 0;
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  line-height: 1.3;
  margin: 2em 0 0.7em;
}

.entry-content h1 {
  font-size: clamp(30px, 4vw, 44px);
}

.entry-content h2 {
  border-bottom: 1px solid var(--line);
  font-size: clamp(25px, 3vw, 34px);
  padding-bottom: 8px;
}

.entry-content h3 {
  font-size: clamp(21px, 2.5vw, 27px);
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content table,
.entry-content pre {
  margin-bottom: 1.35em;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
}

.entry-content li + li {
  margin-top: 0.45em;
}

.entry-content a {
  color: var(--green-2);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.entry-content blockquote {
  background: #f0f4f1;
  border-left: 4px solid var(--green-2);
  color: #33443d;
  margin-left: 0;
  padding: 16px 20px;
}

.entry-content blockquote > :last-child {
  margin-bottom: 0;
}

.entry-content table {
  border-collapse: collapse;
  display: block;
  max-width: 100%;
  overflow-x: auto;
  width: 100%;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  min-width: 120px;
}

.entry-content code {
  background: #edf1ee;
  border-radius: 4px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  padding: 2px 5px;
}

.entry-content pre {
  background: #10231e;
  border-radius: 8px;
  color: #eef6f2;
  overflow-x: auto;
  padding: 18px;
}

.entry-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.category-description {
  color: var(--muted);
  font-size: 17px;
}

.category-description > :last-child {
  margin-bottom: 0;
}

.research-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.research-card {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 24px;
}

.research-card h2 {
  font-size: clamp(21px, 2.4vw, 28px);
  line-height: 1.3;
  margin-bottom: 12px;
}

.research-card h2 a:hover,
.research-card h2 a:focus-visible {
  color: var(--green-2);
}

.research-card-excerpt {
  color: var(--muted);
}

.research-card-excerpt > :last-child {
  margin-bottom: 0;
}

.read-more {
  color: var(--green-2);
  font-weight: 800;
  margin-top: auto;
  padding-top: 20px;
}

.empty-state {
  padding: 28px;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 0;
}

.archive-pagination,
.post-page-links {
  margin-top: 28px;
}

.archive-pagination .nav-links,
.post-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-pagination .page-numbers,
.post-page-links a,
.post-page-links > span {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
}

.archive-pagination .current {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .entry-grid,
  .content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .hero h1 {
    font-size: 36px;
  }

  .entry-grid,
  .content-grid,
  .article-list,
  .observation-layout,
  .research-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .single-article {
    padding: 22px 18px;
  }

  .entry-content {
    font-size: 16px;
  }

  .terminal-panel {
    padding: 14px;
  }

  .signal-chart {
    height: 210px;
  }
}
