:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  padding-top: 0;
  padding-bottom: 32px;
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-bg);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  color: var(--color-brand-primary);
  letter-spacing: 0.02em;
}

h1 {
  font-size: 32px;
  margin-top: 0;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

h4 {
  font-size: 16px;
}

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

a:hover,
a:focus {
  color: var(--color-brand-accent);
  text-decoration: underline;
}

.container {
  width: 100%;
}

.body-content {
  padding: 24px 20px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.tmg-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.tmg-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  gap: 16px;
}

.tmg-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tmg-logo {
  display: block;
  height: 52px;
  width: auto;
}

.tmg-brand-text {
  display: flex;
  flex-direction: column;
  font-family: var(--font-heading);
  text-transform: none;
  letter-spacing: 0.03em;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-brand-muted);
}

.tmg-nav {
  margin-left: auto;
}

.tmg-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tmg-nav-item {
  position: relative;
}

.tmg-nav-item > a {
  display: inline-block;
  background: var(--color-brand-secondary);
  color: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.tmg-nav-item > a:hover,
.tmg-nav-item > a:focus {
  background: var(--color-brand-accent);
  color: var(--color-surface);
  text-decoration: none;
}

.tmg-submenu {
  list-style: none;
  margin: 0;
  padding: 6px;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 190px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 1100;
}

.tmg-submenu li {
  margin: 0;
}

.tmg-submenu a {
  display: block;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--color-brand-secondary);
}

.tmg-submenu a:hover,
.tmg-submenu a:focus {
  background: rgba(63, 95, 121, 0.12);
  color: var(--color-brand-primary);
  text-decoration: none;
}

.tmg-nav-item:hover > .tmg-submenu,
.tmg-nav-item:focus-within > .tmg-submenu {
  display: block;
}

.navbar-right,
.navbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-right a,
.navbar-right span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-brand-secondary);
}

.navbar-right a:hover,
.navbar-right a:focus {
  color: var(--color-brand-accent);
}

.tmg-shell {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.btn {
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 12px;
  border: 1px solid transparent;
  transition: transform 0.1s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--color-brand-primary);
  border-color: var(--color-brand-primary);
  color: var(--color-surface);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-brand-secondary);
  border-color: var(--color-brand-secondary);
  color: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(13, 57, 78, 0.25);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-brand-secondary);
  color: var(--color-brand-secondary);
}

.btn-secondary:hover,
.btn-secondary:focus {
  background: var(--color-brand-secondary);
  color: var(--color-surface);
  box-shadow: 0 0 0 3px rgba(13, 57, 78, 0.2);
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-brand-primary);
  padding: 0;
  text-transform: none;
  font-size: 14px;
}

.form-control,
input,
select,
textarea {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  padding: 8px 12px;
  font-size: 14px;
  max-width: 100%;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px rgba(11, 48, 67, 0.2);
  outline: none;
}

.tmg-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}

.tmg-card h3,
.tmg-card h4 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-brand-secondary);
}

.tmg-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tmg-table th,
.tmg-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}

.tmg-table th {
  background: var(--color-brand-secondary);
  color: var(--color-surface);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.table {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table > thead > tr > th {
  background: var(--color-brand-secondary);
  color: var(--color-surface);
  border-bottom: 0;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.table > thead > tr > th a,
.table > thead > tr > th a:visited {
  color: var(--color-surface);
  text-decoration: none;
  font-weight: 700;
}

.table > thead > tr > th a:hover,
.table > thead > tr > th a:focus {
  color: #ffffff;
  text-decoration: underline;
}

.table > tbody > tr > td,
.table > tbody > tr > th,
.table > tfoot > tr > td,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > thead > tr > th {
  border-color: var(--color-border);
  padding: 10px 12px;
  vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f8fafb;
}

.table-hover > tbody > tr:hover {
  background-color: rgba(13, 57, 78, 0.05);
}

.tmg-alert {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  background: rgba(11, 48, 67, 0.08);
}

.tmg-alert--accent {
  background: rgba(142, 46, 28, 0.12);
  border-color: rgba(142, 46, 28, 0.4);
}

.tmg-section-title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-brand-primary);
}

.plan-scope {
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(13, 57, 78, 0.06);
}

.plan-scope__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.plan-scope__label {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-brand-secondary);
}

.plan-scope__name {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--color-brand-primary);
}

.plan-scope__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-scope__btn {
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

#imagebanner {
  width: 100%;
}

#imagebanner .banner-row {
  display: flex;
  width: 100%;
  margin: 0;
}

#imagebanner .banner-panel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: clamp(110px, 14vw, 170px);
  overflow: hidden;
  background: #d8e0e6;
}

#imagebanner .banner-panel::before {
  content: "";
  position: absolute;
  inset: -12px;
  background-image: var(--banner-image);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: blur(18px);
  opacity: 0.6;
  transform: scale(1.08);
}

#imagebanner .banner-img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 88%;
  max-height: 78%;
  object-fit: contain;
}

.theme-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

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

  .tmg-nav {
    width: 100%;
  }

  .tmg-nav-list {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tmg-submenu {
    position: static;
    display: block;
    box-shadow: none;
    margin-top: 4px;
  }

  #imagebanner .banner-row {
    flex-direction: column;
  }

  #imagebanner .banner-panel {
    min-height: 130px;
  }

  #imagebanner .banner-img {
    max-width: 84%;
    max-height: 74%;
  }
}
