/*
Theme Name: DigiSkills Board
Theme URI: https://digiskills.net/
Author: DigiSkills
Author URI: https://digiskills.net/
Description: A learning-feed WordPress theme for digiskills.net. It combines a community-style post stream, skill category navigation, compact learning cards, and practical sidebars for digital skills content.
Version: 1.6.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: digiskills-board
Tags: blog, education, custom-logo, custom-menu, featured-images, threaded-comments, two-columns, three-columns
*/

:root {
  --ds-bg: #f5f7fb;
  --ds-surface: #ffffff;
  --ds-surface-soft: #eef3ff;
  --ds-border: #dfe7f3;
  --ds-border-strong: #c9d5e8;
  --ds-text: #142033;
  --ds-muted: #64748b;
  --ds-faint: #94a3b8;
  --ds-primary: #2454e8;
  --ds-primary-dark: #1737a6;
  --ds-accent: #ff8a3d;
  --ds-good: #16a34a;
  --ds-radius-sm: 12px;
  --ds-radius-md: 18px;
  --ds-radius-lg: 24px;
  --ds-shadow-sm: 0 8px 22px rgba(20, 32, 51, .06);
  --ds-shadow-md: 0 16px 42px rgba(20, 32, 51, .10);
  --ds-max: 1440px;
  --ds-header-height: 72px;
  --ds-mobile-header-height: 66px;
  --ds-admin-bar-height: 0px;
  --ds-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(36, 84, 232, .10), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, var(--ds-bg) 40%, #f7f9fd 100%);
  color: var(--ds-text);
  font-family: var(--ds-font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ds-primary); }

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

button, input, textarea, select { font: inherit; }

.screen-reader-text,
.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  z-index: 9999;
  background: var(--ds-primary);
  color: #fff;
  border-radius: 10px;
}

.ds-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ds-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--ds-header-height);
  background: rgba(255,255,255,.88);
  border-bottom: 1px solid rgba(201, 213, 232, .72);
  backdrop-filter: blur(18px);
}

.admin-bar .ds-header { top: 32px; }

.ds-header-inner {
  width: min(100%, var(--ds-max));
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 260px minmax(240px, 1fr) auto;
  align-items: center;
  gap: 20px;
}

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

.ds-logo-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--ds-primary), #5c7cff 62%, var(--ds-accent));
  color: #fff;
  font-weight: 900;
  letter-spacing: -.05em;
  box-shadow: 0 10px 24px rgba(36,84,232,.24);
}

.ds-logo-text { min-width: 0; line-height: 1.1; }
.ds-site-title { display:block; font-size: 18px; font-weight: 900; letter-spacing: -.03em; white-space: nowrap; }
.ds-site-tagline { display:block; margin-top: 3px; color: var(--ds-muted); font-size: 12px; white-space: nowrap; overflow:hidden; text-overflow: ellipsis; }

.custom-logo-link img { max-height: 42px; width: auto; display:block; }

.ds-search-form {
  position: relative;
  width: 100%;
}

.ds-search-form input[type="search"] {
  width: 100%;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: #f2f6fd;
  color: var(--ds-text);
  padding: 12px 48px 12px 18px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ds-search-form input[type="search"]:focus {
  background: #fff;
  border-color: rgba(36,84,232,.62);
  box-shadow: 0 0 0 4px rgba(36,84,232,.10);
}

.ds-search-form button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--ds-primary);
  color: #fff;
  cursor: pointer;
}

.ds-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ds-mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ds-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--ds-shadow-sm);
  cursor: pointer;
}

.ds-mobile-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--ds-text);
}

.ds-register-link {
  min-width: 124px;
}

.ds-member-link {
  white-space: nowrap;
}

.ds-mobile-nav-overlay {
  position: fixed;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, .48);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
  z-index: 80;
}

.ds-mobile-sidebar-head {
  display: none;
}

.ds-mobile-sidebar-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--ds-border);
  border-radius: 12px;
  background: #fff;
  color: var(--ds-text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ds-header-menu ul,
.ds-menu,
.ds-chip-list,
.ds-meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ds-header-menu ul { display: flex; align-items: center; gap: 8px; }
.ds-header-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 750;
}
.ds-header-menu a:hover { background: var(--ds-surface-soft); color: var(--ds-primary); }

.ds-login-link,
.ds-submit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 14px;
  font-weight: 850;
  border: 1px solid var(--ds-border);
  color: var(--ds-text);
  background: #fff;
  box-shadow: var(--ds-shadow-sm);
}

.ds-submit-link {
  border-color: var(--ds-primary);
  color: #fff;
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-dark));
}

.ds-layout {
  width: min(100%, var(--ds-max));
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  flex: 1;
}

.ds-left,
.ds-right {
  position: sticky;
  top: calc(var(--ds-header-height) + 22px);
  align-self: start;
}
.admin-bar .ds-left,
.admin-bar .ds-right { top: calc(var(--ds-header-height) + 54px); }

.ds-panel {
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(201,213,232,.72);
  border-radius: var(--ds-radius-lg);
  box-shadow: var(--ds-shadow-sm);
  overflow: hidden;
}

.ds-panel + .ds-panel { margin-top: 16px; }

.ds-panel-header {
  padding: 18px 18px 10px;
}
.ds-panel-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
  color: var(--ds-muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ds-panel-body { padding: 8px 12px 16px; }

.ds-menu li + li { margin-top: 4px; }
.ds-menu a,
.ds-tax-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 15px;
  padding: 10px 12px;
  color: var(--ds-text);
  font-weight: 760;
  font-size: 14px;
}
.ds-menu a:hover,
.ds-tax-link:hover { background: var(--ds-surface-soft); color: var(--ds-primary); }

.ds-category-tree > .ds-category-parent-item + .ds-category-parent-item {
  margin-top: 8px;
}

.ds-tax-parent {
  font-weight: 850;
}

.ds-subcategory-list {
  list-style: none;
  margin: 3px 0 8px 19px;
  padding: 0 0 0 12px;
  border-left: 1px solid rgba(201,213,232,.85);
}

.ds-subcategory-list li + li {
  margin-top: 2px;
}

.ds-tax-child {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 12px;
  color: var(--ds-muted);
  font-size: 13px;
  font-weight: 740;
}

.ds-tax-child span:first-child::before {
  content: "↳";
  margin-right: 6px;
  color: var(--ds-faint);
  font-weight: 900;
}

.ds-icon-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--ds-primary);
  box-shadow: 0 0 0 5px rgba(36,84,232,.10);
  flex: 0 0 auto;
}

.ds-count {
  color: var(--ds-faint);
  font-size: 12px;
  font-weight: 850;
}

.ds-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201,213,232,.80);
  border-radius: 30px;
  background:
    radial-gradient(circle at 90% 10%, rgba(255,138,61,.28), transparent 22rem),
    linear-gradient(135deg, #10233f 0%, #193a70 52%, #2454e8 100%);
  color: #fff;
  box-shadow: var(--ds-shadow-md);
  padding: 34px;
  margin-bottom: 18px;
}

.ds-hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -110px auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}

.ds-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  padding: 5px 12px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .04em;
}

.ds-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.13;
  letter-spacing: -.06em;
}

.ds-hero p {
  max-width: 700px;
  margin: 16px 0 0;
  color: rgba(255,255,255,.82);
}

.ds-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.ds-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  color: #10233f;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

.ds-button.secondary {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.26);
  box-shadow: none;
}

.ds-feed-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  padding: 10px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--ds-shadow-sm);
  margin-bottom: 14px;
}

.ds-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ds-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 850;
}
.ds-tab.active,
.ds-tab:hover { background: var(--ds-surface-soft); color: var(--ds-primary); }

.ds-view-note { color: var(--ds-muted); font-size: 13px; font-weight: 700; white-space: nowrap; }

.ds-feed { display: grid; gap: 14px; }

.ds-post-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--ds-border);
  border-radius: var(--ds-radius-lg);
  background: rgba(255,255,255,.94);
  overflow: hidden;
  box-shadow: var(--ds-shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ds-post-card:hover {
  transform: translateY(-2px);
  border-color: var(--ds-border-strong);
  box-shadow: var(--ds-shadow-md);
}

.ds-post-rail {
  background: linear-gradient(180deg, #f6f9ff, #edf3ff);
  border-right: 1px solid var(--ds-border);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ds-score-btn {
  width: 36px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: var(--ds-faint);
  cursor: default;
}
.ds-score-value { font-size: 13px; font-weight: 950; color: var(--ds-text); line-height: 1; }
.ds-score-label { font-size: 10px; font-weight: 800; color: var(--ds-faint); letter-spacing: .04em; }

.ds-post-body { padding: 18px 20px 16px; min-width: 0; }

.ds-post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--ds-muted);
  font-size: 12px;
  font-weight: 780;
}

.ds-community {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ds-primary);
  font-weight: 950;
}

.ds-community::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  opacity: .25;
}

.ds-category-breadcrumb {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 850;
}

.ds-category-breadcrumb a {
  color: inherit;
}

.ds-category-breadcrumb a:last-of-type {
  color: #fff;
}

.ds-category-breadcrumb span {
  color: rgba(255,255,255,.45);
}

.ds-level {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  background: #fff4eb;
  color: #a54d00;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 900;
}

.ds-post-title {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 27px);
  line-height: 1.38;
  letter-spacing: -.035em;
}
.ds-post-title a:hover { color: var(--ds-primary); }

.ds-thumb {
  overflow: hidden;
  border-radius: 16px;
  margin: 12px 0;
  background: var(--ds-surface-soft);
  aspect-ratio: 16/8;
}
.ds-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ds-excerpt { margin: 10px 0 0; color: #44546a; }

.ds-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.ds-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f3f6fb;
  color: var(--ds-muted);
  font-size: 12px;
  font-weight: 820;
}
.ds-pill:hover { background: var(--ds-surface-soft); color: var(--ds-primary); }

.ds-tag-list { display:flex; gap: 6px; flex-wrap: wrap; }
.ds-tag-list a { color: var(--ds-muted); }

.ds-empty {
  padding: 34px;
  border: 1px dashed var(--ds-border-strong);
  border-radius: var(--ds-radius-lg);
  background: rgba(255,255,255,.74);
  text-align: center;
}

.ds-single {
  border: 1px solid var(--ds-border);
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--ds-shadow-md);
  overflow: hidden;
}

.ds-single-header {
  padding: 34px 38px 20px;
  border-bottom: 1px solid var(--ds-border);
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.ds-single-title {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.14;
  letter-spacing: -.06em;
}

.ds-single-content {
  padding: 34px 38px;
}

.ds-single-content > *:first-child { margin-top: 0; }
.ds-single-content h2,
.ds-single-content h3 { line-height: 1.35; letter-spacing: -.035em; margin-top: 1.8em; }
.ds-single-content p { margin: 1.1em 0; }
.ds-single-content a { color: var(--ds-primary); text-decoration: underline; text-underline-offset: 3px; }
.ds-single-content blockquote {
  margin: 24px 0;
  padding: 16px 20px;
  border-left: 5px solid var(--ds-primary);
  background: var(--ds-surface-soft);
  border-radius: 0 16px 16px 0;
}
.ds-single-content pre,
.ds-single-content code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
}
.ds-single-content code { padding: 2px 6px; }
.ds-single-content pre { padding: 16px; overflow:auto; }

.ds-post-nav {
  padding: 0 38px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ds-post-nav a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--ds-radius-md);
  background: #f3f6fb;
  color: var(--ds-muted);
  font-weight: 800;
}
.ds-post-nav a:hover { background: var(--ds-surface-soft); color: var(--ds-primary); }

.ds-comments {
  margin-top: 18px;
  border: 1px solid var(--ds-border);
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--ds-shadow-sm);
  padding: 28px 34px;
}

.comment-list { list-style:none; margin:0; padding:0; }
.comment-list .comment { padding: 16px 0; border-top: 1px solid var(--ds-border); }
.comment-list .comment:first-child { border-top: 0; }
.comment-body { color: #334155; }
.comment-meta { color: var(--ds-muted); font-size: 13px; }
.comment-reply-link { color: var(--ds-primary); font-weight: 850; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--ds-border);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
}
.comment-form input[type="submit"] {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--ds-primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.ds-widget-card {
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--ds-border);
}
.ds-widget-card + .ds-widget-card { margin-top: 12px; }
.ds-widget-card h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.03em; }
.ds-widget-card p { margin: 0; color: var(--ds-muted); font-size: 14px; }
.ds-widget-card .ds-button { margin-top: 14px; background: var(--ds-primary); color: #fff; box-shadow: none; }

.ds-footer {
  margin-top: 22px;
  border-top: 1px solid var(--ds-border);
  background: #fff;
}
.ds-footer-inner {
  width: min(100%, var(--ds-max));
  margin: 0 auto;
  padding: 28px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  color: var(--ds-muted);
  font-size: 14px;
}

.pagination,
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 24px 0 0;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  background: #fff;
  color: var(--ds-muted);
  font-weight: 850;
}
.page-numbers.current,
.page-numbers:hover { background: var(--ds-primary); border-color: var(--ds-primary); color: #fff; }

.wp-caption, .gallery-caption, .bypostauthor { max-width: 100%; }
.aligncenter { display:block; margin-left:auto; margin-right:auto; }
.alignleft { float:left; margin-right: 1.4em; }
.alignright { float:right; margin-left: 1.4em; }

@media (max-width: 1180px) {
  .ds-header-inner { grid-template-columns: 220px minmax(220px, 1fr) auto; }
  .ds-layout { grid-template-columns: 210px minmax(0,1fr); }
  .ds-right { display: none; }
}

@media (max-width: 860px) {
  .admin-bar .ds-header { top: 0; }
  .ds-header {
    height: auto;
    position: sticky;
    top: 0;
  }
  .ds-header-inner {
    grid-template-columns: auto minmax(0,1fr) auto;
    padding: 12px 16px;
    gap: 10px;
  }
  .ds-mobile-nav-toggle { display: inline-flex; }
  .ds-brand { min-width: 0; }
  .ds-site-title { font-size: 16px; }
  .ds-site-tagline { display: none; }
  .ds-search-form {
    grid-column: 1 / -1;
    order: 3;
  }
  .ds-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .ds-header-menu { display: none; }
  .ds-register-link,
  .ds-member-link {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
  }
  .ds-layout { grid-template-columns: 1fr; padding: 16px; }
  .ds-left {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    max-width: 320px;
    padding: 14px;
    margin: 0;
    overflow-y: auto;
    background: #f5f7fb;
    z-index: 90;
    transform: translateX(-110%);
    transition: transform .22s ease;
    order: initial;
  }
  .ds-mobile-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 4px 2px 10px;
  }
  body.ds-menu-open .ds-left {
    transform: translateX(0);
  }
  body.ds-menu-open .ds-mobile-nav-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .ds-content { order: 1; }
  .ds-hero { padding: 26px; border-radius: 24px; }
  .ds-feed-bar { align-items: flex-start; flex-direction: column; }
  .ds-view-note { white-space: normal; }
  .ds-post-card { grid-template-columns: 1fr; }
  .ds-post-rail { display: none; }
  .ds-single-header,
  .ds-single-content,
  .ds-post-nav { padding-left: 22px; padding-right: 22px; }
  .ds-post-nav { grid-template-columns: 1fr; }
  .ds-comments { padding: 22px; }
  .ds-footer-inner { grid-template-columns: 1fr; }
}


/* DigiSkills account pages */
.ds-account-layout {
  width: min(100%, var(--ds-max));
  margin: 0 auto;
  padding: 42px 24px;
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
  flex: 1;
}

.ds-auth-card,
.ds-auth-side,
.ds-profile-card,
.ds-account-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201,213,232,.82);
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--ds-shadow-md);
}

.ds-auth-card {
  padding: 34px;
}

.ds-auth-card-narrow {
  max-width: 620px;
}

.ds-auth-side,
.ds-account-panel {
  padding: 30px;
  background:
    radial-gradient(circle at top right, rgba(36,84,232,.14), transparent 18rem),
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.ds-auth-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 10px;
  border-radius: 999px;
  padding: 5px 11px;
  background: var(--ds-surface-soft);
  color: var(--ds-primary);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ds-auth-card h1,
.ds-profile-card h1,
.ds-auth-side h2,
.ds-account-panel h2 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -.055em;
}

.ds-auth-card h1,
.ds-profile-card h1 {
  font-size: clamp(32px, 4vw, 48px);
}

.ds-auth-side h2,
.ds-account-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.ds-auth-lead,
.ds-auth-side p,
.ds-account-panel p,
.ds-profile-head p {
  color: var(--ds-muted);
}

.ds-auth-form {
  margin-top: 24px;
}

.ds-auth-form p {
  margin: 0 0 16px;
}

.ds-auth-form label,
.ds-field label {
  display: block;
  margin-bottom: 7px;
  color: var(--ds-text);
  font-size: 13px;
  font-weight: 850;
}

.ds-auth-form input[type="text"],
.ds-auth-form input[type="email"],
.ds-auth-form input[type="password"],
.ds-auth-form input[type="url"],
.ds-auth-form input[type="search"],
.ds-auth-form textarea {
  width: 100%;
  border: 1px solid var(--ds-border);
  border-radius: 16px;
  background: #f8fbff;
  color: var(--ds-text);
  padding: 13px 14px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.ds-auth-form input:focus,
.ds-auth-form textarea:focus {
  background: #fff;
  border-color: rgba(36,84,232,.62);
  box-shadow: 0 0 0 4px rgba(36,84,232,.10);
}

.ds-field {
  margin-bottom: 16px;
}

.ds-field small {
  display: block;
  margin-top: 6px;
  color: var(--ds-muted);
  font-size: 12px;
}

.ds-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 12px 0 18px;
  color: var(--ds-muted);
  font-size: 14px !important;
  line-height: 1.6;
}

.ds-check input {
  margin-top: 5px;
}

.ds-auth-submit,
.ds-auth-form input[type="submit"] {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-primary-dark));
  color: #fff;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(36,84,232,.22);
}

.ds-auth-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.ds-auth-submit.as-link,
.ds-auth-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  text-decoration: none;
}

.ds-auth-secondary {
  min-height: 46px;
  border: 1px solid var(--ds-border);
  border-radius: 999px;
  padding: 11px 16px;
  background: #fff;
  color: var(--ds-text);
  font-weight: 880;
}

.ds-auth-secondary.muted {
  color: var(--ds-muted);
}

.ds-auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
  color: var(--ds-muted);
  font-size: 14px;
  font-weight: 780;
}

.ds-auth-links a {
  color: var(--ds-primary);
}

.ds-auth-actions,
.ds-account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.ds-auth-notice {
  margin: 18px 0 0;
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
}

.ds-auth-notice ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.ds-auth-notice.success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.ds-auth-notice.error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
}

.ds-auth-badge {
  display: inline-flex;
  margin-bottom: 16px;
  border-radius: 999px;
  padding: 6px 12px;
  background: #10233f;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}

.ds-auth-benefits {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.ds-auth-benefits li {
  position: relative;
  padding: 11px 0 11px 30px;
  border-top: 1px solid var(--ds-border);
  color: var(--ds-text);
  font-weight: 760;
}

.ds-auth-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 11px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--ds-primary);
  color: #fff;
  font-size: 12px;
}

.ds-profile-card {
  padding: 34px;
}

.ds-profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
}

.ds-profile-avatar img {
  display: block;
  border-radius: 24px;
  box-shadow: var(--ds-shadow-sm);
}

.ds-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 10px;
  margin-top: 24px;
}

.ds-stat-card {
  border: 1px solid var(--ds-border);
  border-radius: 18px;
  padding: 16px;
  background: #f8fbff;
}

.ds-stat-card strong {
  display: block;
  font-size: 26px;
  line-height: 1;
  letter-spacing: -.04em;
}

.ds-stat-card span {
  display: block;
  margin-top: 7px;
  color: var(--ds-muted);
  font-size: 12px;
  font-weight: 850;
}

.ds-recent-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
}

.ds-recent-list li {
  padding: 14px 0;
  border-top: 1px solid var(--ds-border);
}

.ds-recent-list a {
  display: block;
  color: var(--ds-text);
  font-weight: 850;
}

.ds-recent-list span {
  display: block;
  margin-top: 4px;
  color: var(--ds-muted);
  font-size: 12px;
  font-weight: 760;
}

.ds-next-steps {
  margin-top: 22px;
  border-radius: 22px;
  padding: 18px;
  background: var(--ds-surface-soft);
}

.ds-next-steps h3 {
  margin: 0 0 10px;
}

.ds-next-steps ol {
  margin: 0;
  padding-left: 1.4em;
}

/* Tablet/mobile layout: closer to the compact Reddit-style top bar shown in the reference. */
@media (max-width: 1180px) {
  .admin-bar .ds-header { top: 32px; }
  .ds-header {
    height: auto;
    position: sticky;
    top: 0;
    background: rgba(255,255,255,.96);
  }
  .ds-header-inner {
    grid-template-columns: 44px minmax(0,1fr) auto;
    padding: 8px 14px;
    gap: 12px;
  }
  .ds-mobile-nav-toggle {
    display: inline-flex;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .ds-mobile-nav-toggle span { width: 20px; }
  .ds-brand { display: none; }
  .ds-search-form {
    grid-column: auto;
    order: initial;
    min-width: 0;
  }
  .ds-search-form input[type="search"] {
    height: 44px;
    padding: 10px 48px 10px 18px;
    background: #eef3f7;
  }
  .ds-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
  }
  .ds-header-menu { display: none; }
  .ds-register-link,
  .ds-member-link {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: none;
  }
  .ds-layout {
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
  }
  .ds-right { display: none; }
  .ds-left {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    max-width: 320px;
    padding: 14px;
    margin: 0;
    overflow-y: auto;
    background: #f5f7fb;
    z-index: 150;
    transform: translateX(-110%);
    transition: transform .22s ease;
    order: initial;
  }
  .ds-mobile-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 4px 2px 10px;
  }
  body.ds-menu-open { overflow: hidden; }
  body.ds-menu-open .ds-left {
    transform: translateX(0);
  }
  body.ds-menu-open .ds-mobile-nav-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 140;
  }
  .ds-content {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    order: 1;
  }
  .ds-hero,
  .ds-feed-bar {
    margin-left: 12px;
    margin-right: 12px;
  }
  .ds-feed { gap: 0; }
  .ds-post-card {
    grid-template-columns: 1fr;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
  }
  .ds-post-card:hover {
    transform: none;
    box-shadow: none;
  }
  .ds-post-rail { display: none; }
  .ds-post-body { padding: 14px 18px; }
  .ds-post-title { font-size: clamp(18px, 2.6vw, 24px); }
  .ds-account-layout {
    grid-template-columns: minmax(0,1fr);
    max-width: 920px;
  }
}

@media (max-width: 782px) {
  .admin-bar .ds-header { top: 46px; }
}

@media (max-width: 860px) {
  .ds-header-inner {
    grid-template-columns: 42px minmax(0,1fr) auto;
    padding: 8px 10px;
    gap: 8px;
  }
  .ds-search-form {
    grid-column: auto;
    order: initial;
  }
  .ds-layout { padding: 0; }
  .ds-hero {
    margin: 10px 10px;
    padding: 22px;
    border-radius: 22px;
  }
  .ds-feed-bar {
    margin: 0 10px 10px;
    align-items: flex-start;
    flex-direction: column;
  }
  .ds-view-note { white-space: normal; }
  .ds-single-header,
  .ds-single-content,
  .ds-post-nav { padding-left: 22px; padding-right: 22px; }
  .ds-post-nav { grid-template-columns: 1fr; }
  .ds-comments {
    padding: 22px;
    margin-left: 10px;
    margin-right: 10px;
    border-radius: 24px;
  }
  .ds-footer-inner { grid-template-columns: 1fr; }
  .ds-account-layout {
    grid-template-columns: 1fr;
    padding: 24px 14px;
  }
  .ds-auth-side { order: -1; }
  .ds-profile-head {
    align-items: flex-start;
  }
  .ds-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .ds-register-link,
  .ds-member-link {
    padding: 7px 10px;
    min-width: 0;
    font-size: 12px;
  }
  .ds-search-form input[type="search"] { font-size: 14px; }
  .ds-post-body { padding: 12px 14px; }
  .ds-post-meta { font-size: 11px; }
  .ds-card-footer { gap: 6px; }
  .ds-pill {
    min-height: 28px;
    padding: 5px 8px;
  }
  .ds-auth-card,
  .ds-auth-side,
  .ds-profile-card,
  .ds-account-panel {
    border-radius: 24px;
    padding: 24px;
  }
}


/* v1.4: Reddit-like mobile drawer.
   Keep the top header visible and open the left drawer directly underneath it, with no gap. */
@media (max-width: 1180px) {
  body.admin-bar { --ds-admin-bar-height: 32px; }

  .ds-header {
    height: var(--ds-mobile-header-height);
  }

  .ds-left,
  .admin-bar .ds-left {
    top: calc(var(--ds-admin-bar-height) + var(--ds-mobile-header-height)) !important;
    bottom: 0 !important;
    height: calc(100vh - var(--ds-admin-bar-height) - var(--ds-mobile-header-height));
    height: calc(100dvh - var(--ds-admin-bar-height) - var(--ds-mobile-header-height));
    max-height: calc(100vh - var(--ds-admin-bar-height) - var(--ds-mobile-header-height));
    max-height: calc(100dvh - var(--ds-admin-bar-height) - var(--ds-mobile-header-height));
    padding-top: 14px;
  }

  .ds-mobile-nav-overlay,
  .admin-bar .ds-mobile-nav-overlay {
    inset: calc(var(--ds-admin-bar-height) + var(--ds-mobile-header-height)) 0 0 0 !important;
  }
}

@media (max-width: 782px) {
  body.admin-bar { --ds-admin-bar-height: 46px; }
}
