/* Tom's Hardware Guide PL — light flex redesign, original palette */
:root {
  --bg: #fffff8;
  --bg-soft: #efefe9;
  --sidebar: #e5e1da;
  --sidebar-border: #d2ced7;
  --header: #000000;
  --header-alt: #b8b8bf;
  --text: #000000;
  --muted: #555555;
  --link: #003366;
  --link-hover: #006600;
  --accent: #006600;
  --rule: #000000;
  --max: 1100px;
  --font: Verdana, Geneva, Tahoma, sans-serif;
  --font-display: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background:
    linear-gradient(180deg, #f7f4ec 0%, var(--bg) 180px),
    var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.site-header {
  background: var(--bg);
  border-bottom: 1px solid #ddd8cf;
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 16px 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand img {
  display: block;
  width: min(420px, 100%);
  height: auto;
}

.site-brand__fallback {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-header__rule {
  height: 3px;
  background: var(--rule);
  max-width: var(--max);
  margin: 0 auto;
}

.site-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
  flex: 1;
}

.site-nav {
  flex: 0 0 200px;
  background: var(--sidebar);
  border: 1px solid var(--sidebar-border);
}

.site-nav__section + .site-nav__section {
  border-top: 1px solid var(--sidebar-border);
}

.site-nav__title {
  margin: 0;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: var(--header);
}

.site-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__list a {
  display: block;
  padding: 7px 10px 7px 14px;
  color: var(--text);
  font-size: 12px;
  border-bottom: 1px solid var(--sidebar-border);
  border-left: 5px solid transparent;
}

.site-nav__list a:hover,
.site-nav__list a.is-active {
  background: #f3efe7;
  text-decoration: none;
}

.site-nav__list--sections a[data-section="motherboard"] { border-left-color: #006600; }
.site-nav__list--sections a[data-section="cpu"] { border-left-color: #606030; }
.site-nav__list--sections a[data-section="graphic"] { border-left-color: #003366; }
.site-nav__list--sections a[data-section="display"] { border-left-color: #225588; }
.site-nav__list--sections a[data-section="video"] { border-left-color: #000066; }
.site-nav__list--sections a[data-section="storage"] { border-left-color: #006666; }
.site-nav__list--sections a[data-section="network"] { border-left-color: #003333; }
.site-nav__list--sections a[data-section="mobile"] { border-left-color: #556644; }
.site-nav__list--sections a[data-section="consumer"] { border-left-color: #882266; }
.site-nav__list--sections a[data-section="howto"] { border-left-color: #000000; }
.site-nav__list--sections a[data-section="game"] { border-left-color: #444433; }
.site-nav__list--sections a[data-section="business"] { border-left-color: #444433; }
.site-nav__list--sections a[data-section="column"] { border-left-color: #cc9900; }
.site-nav__list--sections a[data-section="firstlook"] { border-left-color: #333333; }

.nav-toggle {
  display: none;
  width: 100%;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--sidebar-border);
  background: var(--header);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.site-main {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--bg);
}

.page-header {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--header);
}

.page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.25;
  font-weight: 700;
}

.page-lead {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.content,
.legacy-content {
  overflow-wrap: anywhere;
}

.legacy-content table {
  max-width: 100%;
}

.legacy-content img {
  max-width: 100%;
  height: auto;
}

.legacy-content font {
  font-family: inherit !important;
}

.home-grid {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.home-block h2 {
  margin: 0 0 10px;
  padding: 6px 10px;
  font-size: 1rem;
  color: #fff;
  background: var(--header);
  font-family: var(--font-display);
}

.home-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid #e4dfd6;
}

.home-item img.icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}

.home-item h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  line-height: 1.3;
}

.home-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.section-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.section-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e4dfd6;
}

.section-list a {
  font-weight: 700;
}

.section-list .meta {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 400;
}

.blog-container {
  margin-top: 8px;
}

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.blog-card {
  padding: 12px 0;
  border-bottom: 1px solid #e4dfd6;
}

.blog-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.blog-preview {
  color: var(--muted);
  font-size: 0.9rem;
}

.blog-preview p {
  margin: 0;
}

.site-footer {
  margin-top: auto;
  background: var(--header);
  color: #ddd;
  padding: 18px 16px;
  font-size: 12px;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer a {
  color: #fff;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.romlicontainer {
  max-width: 100%;
}

@media (max-width: 860px) {
  .site-wrap {
    flex-direction: column;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    flex: 1 1 auto;
    width: 100%;
    display: none;
  }

  .site-nav.is-open {
    display: block;
  }
}
